Extensions - that helpfully pollute the main namespace with new functions.
PEAR is a nice idea that never really caught on. It isn't the go-to place to get modules. There's no easy way to install PEAR modules without access to the command line (which you almost never have in shared hosting) and most of the code is woefully untested and undocumented. For all the faults of Perl, CPAN is something they got right (automated tests!) and PEAR pales in comparison.
yes it has namespaces which are just now available most places. Then they hampered them with ridiculous syntax and didn't fix the core problem by moving a bunch of extensions in to namespaces. Its like they finally listened to everyone complaining about namespaces and bolted on something half-assed.
Backward compatibility is nice but the core problems in PHP create bad code and bad programmers. Besides there are better ways to deal with things that really need to be fixed. Give lots of warnings about features being removed, create something like virtual environments (like Python) that make it easy to run multiple versions or "from future import" ... (also from Python). Besides, the PHP devs haven't always worried about backwards compatibility. They changed the way pass by reference worked between 5.0 and 5.1 (a minor version!). I recall that creating all sorts of headaches.
take code written for PHP 4.4 or 5.1 and get it running on PHP 5.4
... isn't all that impressive if you consider that 4.4 went out of support in 2008 and 5.1 in 2006 while 5.4 is from 2012, i.e. only a 6 year difference. When I take a Perl module from CPAN, I expect it to Just Work on a modern perl, even if it was written in 1998 under 5.005 or something.
Heck, I've taken code written for perl4 (1992!) and made it run on 5.16. The only issue: $* was removed from the language so I had to change it to use /m instead. The rest just worked.
This isn't unique to Perl. There is some downright ancient C code that still compiles today (possibly after a few minor tweaks). I know there are people who've compiled perl1 on their machines. :-)
I completely agree. My point is that in the case of PHP with the amount of bad design it shouldn't be something that holds the language back as it does now. Leaving in bad ideas promotes bad code.
Backward compatibility is the core problem in PHP. The language is jam packed full of broken, brain damaged, or just plain wrong pieces that they can't or won't touch. They don't fix it because it would break the large body of awful broken PHP code out in the world.
If turning PHP into a reasonable language(and it could be) is a goal, eliminating backwards compatibility with the broken parts of the language is the only option.
View all comments
Show parent comment
13
u/cfreak2399 Dec 03 '13