DEV Community

Discussion on: PHP sucks, can it suck less?

Collapse
 
deleugyn profile image
Marco Aurélio Deleu

I think you started with a great post but deviated in the middle of it.
If you step back for a second you can see the irony in the post.
You're asking people that hold strong opinions against PHP to open their minds a little and see the evolution of the language. The key component here is "strong opinion". It is the core of all these discussions.
Your article is packed with strong opinions such as "you shouldn't use a web framework", "you should use strict typing", and "active record is evil".
At the expense of trying to convince strong opinionated people that PHP dont suck you end up spreading your strong opinion against one of the largest PHP community: Laravel. A web framework without static typing build with Active Record in mind.
It makes your article read as: "Hey people, you have some pretty bad strong opinion about PHP. Here are some up to date strong opinions you should hold so that we can collectively hate on other communities instead".
My reply may seem like I have some strong strong opinions of my own and to a certain extent that is true, but what I've been learning is that it's best to keep ripping strong opinions apart and being accepting of the diversity. As an example, you could have said that with PHP you're not forced into a web framework if you dont like to be bound to one, but for those that do like it we have some great ones like Symfony, Laravel and Slim.

TL;DR: Try not to advertise against strong opinions with more strong opinions.

Collapse
 
2dsharp profile image
Dedipyaman Das

I understand what you mean by that. And yes, I do hold strong opinions on my own. But the fact is, I'm not forcing any of those ideas to anyone.

Strict typing is optional, as I mentioned in the post, in a dynamically typed language of course you'd like to use the dynamic typing. What I wanted to convey is: use dynamic typing when you need to, otherwise stay on the safer side with predictability.

Also, I am not targeting any particular framework. Laravel has its problems and so does every other framework. Choose what you need to, when you need to. I personally like taking pieces off Symfony and wiring them up together. I never said, "never use a web framework". I recommended to not get tightly coupled to one framework.

About Active Record: yes, I do believe it's an Anti-pattern. And I would advise anyone against it.