4 ms·
These topics always just smell of "Now I'm a grown up programmer I'm going to tell the world how much I understand by slamming an easy target language". I love
by weego 16y ago
These topics always just smell of "Now I'm a grown up programmer I'm going to tell the world how much I understand by slamming an easy target language".
I love PHP and have used it for years since moving away from asp.net and agree with some of the posters arguments as a theoretical principle, but as day-to-day PHP developer I also say so what. Naming and parameter inconsistencies? Yes, my libraries have that too and I can at least learn the PHP ones with some experiernce. I don't know any asp.net developer that doesn't have to use some kind of tool to help them find where System.Obscure.FoundItOnline.Function exists in the monster .net namespace system. It allows me to be productive and allows me to be the gatekeeper of how well or poorly I implement things.
This is a crucial point of the constant argument about poor PHP logic/presentation support for me, I can happily write mixed and messy code for a £500 job or I can write some clever system that implements caching and output buffer manipulation and have a great template system.
There are far too many people spending far too much time thinking that academic level programming considerations are applicable in every detail to every day programming practices of web developers.
- lhorie 16y agoAgreed. Fwiw, many of the complaints apply to other "better" languages also: - PHP has inconsistent naming of built-in and library functions. - C has types like int, size_t, jmp_buf and FILE - PHP performance is abysmal without caching - MRI Ruby is pretty slow too - Functions are case insensitive - Lisp anyone? etc etc The whole meme of PHP warts seems more like an exercise in confirmation bias than objective analysis.
- marte 16y agoYeah, but if we continue that logic and fill up that "etc etc" it would seem that the other languages have their own bad features and PHP combines them all.
- lhorie 16y agoThat "all" is what I'm referring to when I mentioned confirmation bias. PHP programs don't segfault when you have a typo. You don't have macro expansion problems. It's not particularly verbose. Most languages have a ton of issues. Imho, the stuff in the PHP list is pretty minor compared to some of the warts in some other languages.
- jrockway 16y agoYeah, the minor details of PHP don't really matter. It's the whole language and ecosystem when viewed as one that is really repulsive. It's also difficult to write good code, because there are no abstraction mechanisms. Well, there's one -- Java-style OO. But incidentally, Java is almost impossible to use for the same reason.
- lhorie 16y agoI'm curious why you think the ecosystem contributes to the bad rep. If anything, I think that's one thing PHP has going for it. In general, yes, seasoned programmers who are new(ish) to PHP tend to have a bit of a NIH-based bias against the frameworks, but you gotta admit that other languages simply don't have the one-click-install-everything-you-will-never-need sort of thing that Fantastico or whatever gives you. >> Well, there's one -- Java-style OO. But incidentally, Java is almost impossible to use for the same reason. Tiobe begs to differ :)