|
|
|
|
|
by dgivney
453 days ago
|
|
> The issue isn’t what can be done in PHP, it's what PHP encourages by default: Lets break this done. > global state, PHP is stateless. > poor encapsulation, Encapsulation in PHP is mostly consistent with Java. > inconsistent APIs, PHP is written in C and an original design decision by those C programmers was to make the APIs consistent with libc. > and difficult-to-enforce discipline. Its very easy to enforce. All modern projects would run tools like Pint, Phpcs & Phpcbf to enforce their code standards and preferred style in their CI Pipeline. |
|
Old PHP did have some pretty inconsistent naming conventions (or lack of). Which is what I think the GP was referring to.
I’ve not written any PHP in quite a few years but I’ve read that there’s been a concerted effort to address those inconsistencies and the old complaint is now just a relic of a bygone era.
One thing I have learned over the several decades that I’ve been writing software is that literally every language could have a book written about its problems. People often seem to forget that language design is a constant battle of tradeoffs. And because their preferred languages naturally align with their tradeoff preferences, they don’t even realise that their own preferences are deeply flawed for a great many type of scenarios too.
So it really disappoints me when people subscribe to language tribes like it’s their religion.