4 ms·
PHP most hated?? what's wrong with PHP? it's a great introductory language
by 867-5309 7y ago
PHP most hated?? what's wrong with PHP? it's a great introductory language
- nogabebop23 7y agoPeople also "Hate" Basic, but it was the gateway drug for almost everyone who discovered computers in the 80's It seems really weird to Hate something you can easily make irrelevant to your life - maybe people mean they hate maintenance programming on old, cruddy code, of which there would be a lot of PHP - that's not really on the language though...
- TeMPOraL 7y agoLike a lot of things in our industry, I believe hate for programming languages is just another fashion. Few people have some actual reasons or experiences, everyone else is just mimicking. In case of BASIC, I think the source of the hate is mostly Dijkstra saying things like: "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." or: "teaching of BASIC should be rated as a criminal offence: it mutilates the mind beyond recovery." Dijkstra is one of the ancient saints of computing, so people read this as gospel. PHP is a more complex case. The language had (last I checked, which was years ago) legitimate issues. But on top of that, because of the LAMP stack, it enabled easy web development, which opened the floodgates for novices. Suddenly, you had an influx of people with no experience and little understanding, all writing production code and - more importantly - tutorials for each other. This was self-reinforcing, so there was a period in which your average PHP code base was a steaming pile of garbage, and educational resources Google led you to weren't any better. That time is, in my experience, the source of PHP hate. Why no hate for Ruby or Python or other stacks? I think because they've managed to rein in their respective communities better (they actually had communities, not mobs), and perhaps also because PHP was where most mistakes of backend development were made - so newer stacks had the benefit of hindsight. You can see the same pattern repeating now with hate of JavaScript. One of the big reasons is, again, the flood of inexperienced novices producing garbage code and tutorials for each other, creating noise that drowns out both good libraries and good educational material. All the mistakes of frontend development are being made as we speak. (The other big source of hate is the fear of the mob expanding to encompass other areas than web development. In the LAMP stack days, no one really tried to code PHP for microcontrollers. But attempts at running JavaScript or even Node itself on microcontrollers abound. Or, see how Electron is sucking out not just your computing resources, but also the proverbial oxygen from the native app development room.)
- klyrs 7y ago> or: "teaching of BASIC should be rated as a criminal offence: it mutilates the mind beyond recovery." > Dijkstra is one of the ancient saints of computing, so people read this as gospel. Can confirm. Learned BASIC (a very limited subset) at age 7. GOTO was the second concept I learned after PRINT. Have not stopped using either and kinda wish Python had a goto (except that I've worked through what that would actually entail; not worth it). Strict adherence to Dijkstra's hobgoblins is considered harmful.
- capableweb 7y agoThere seems to be a common thread that languages that are easy to pick up (not necessary "learn") are also harder to make use of to build something once your skill level has gone up a bit. So PHP, easy to pick up, but once you grok it, you usually move to something else, then you just remember PHP as the language when you were a beginner, and therefore you look down on it. Seeing the same with BASIC or other more, basic languages.
- lowercased 7y ago> There seems to be a common thread that languages that are easy to pick up (not necessary "learn") are also harder to make use of to build something once your skill level has gone up a bit. There's also a line of thinking that some languages (like Python) are both a great beginner language and simultaneously a bedrock language that should be a first choice for many advanced/complex problem spaces as well.
- knocte 7y agoROFL
- ptx 7y agoPHP certainly works just fine when used well, but what in particular makes it a great introductory language? (As for what's (arguably) wrong with it, have a look at this talk[1] by Rasmus Lerdorf about its creation. He intended it as a quick and dirty templating system for C programs. Because it was never designed to be a programming language, but somehow organically grew into one, it lacks (in the eyes of some) the elegance of a purposefully designed language.) [1] https://www.youtube.com/watch?v=iGOAQli7tGc https://www.youtube.com/watch?v=iGOAQli7tGc
- marcosdumay 7y ago> what's wrong with PHP? There is a great deal of complexity on every single construct on the language, and there is not enough expressive power to create simple programs that do a lot of things. At the late 90's and early 00's, there was a fashion of creating high level languages by adding very powerful framework into a very basic language. That makes for a beginner-only language that is easy to kinda-learn, but hard to create anything good. PHP is trying to evolve beyond this, but all the legacy does hold it back.