3 ms·
Rasmus has been repeating this line to everyone for years now: I actually feel pretty bad for him. He gets quite a bit of flak for the language, when it actual
by bkrausz 16y ago
Rasmus has been repeating this line to everyone for years now: I actually feel pretty bad for him. He gets quite a bit of flak for the language, when it actually does exactly what it's meant to.
Everyone just likes to hate on it because it's not "proper" enough for the academics and doesn't make enough assumptions (ala RoR) for many of the practicalists (I know I'm making up a word).
- jrockway 16y agoNo, this is not right. The problem with PHP is that you can't use PHP to fix PHP. If you encounter a problem, there is no way to write a library to fix it. Perl, on the other hand, was designed with "academic" abstraction mechanisms that can be hooked to change the language. For years, this was a problem -- Perl 5's object system was more like an object system object system. Everyone built their own object system for every application, and then used that. This made a mess, and annoyed everyone, because everyone was doing OO in their own slightly-wrong way. Yuck. Then someone decided, "hey, let's use this object system object system to write a real object system!", and Moose was born. Now most new Perl 5 apps all use the same object system, and everything works much better. OO modules compose. Objects can be shared. It's possible to write object databases that actually work. (Just look at the MooseX:: namespace on search.cpan. All of these modules fundamentally change how "object oriented programming" works for a particular class or group of classes, but they all compose together cleanly and don't have effect outside of a limited scope. Beautiful! And it makes writing reusable code easy!) No changes to Perl were ever needed for this, and yet the object system is probably the most flexible and feature-rich of any major programming language. If PHP had the ability to be changed by PHP programmers, then the massive community would have cleanly fixed all the problems already. The Perl community did it. The Ruby community did it. Even the Java community sort of did it. But since the attitude is that PHP is just a hack on a hack, and web apps should just be hacks, PHP remains a hack on a hack that's too difficult to use for complex projects.
- mootothemax 16y agoIf PHP had the ability to be changed by PHP programmers, then the massive community would have cleanly fixed all the problems already. PHP's greatest strength is also its greatest weakness: it's very easy to pick up and start running code. Have you read the huge number of broken tutorials that tell newbie users how cool, for example, variable variables are? Can you imagine the new levels of abuse such a system would introduce? ;)
- jrockway 16y agoCan you imagine the new levels of abuse such a system would introduce? Actually yes, it's called Rails. But anyway, a system that can't be broken is also one that can't be fixed. PHP programmers switching to Rails did some weird stuff, but without that ability to do weird stuff, Rails wouldn't have even been possible.