4 ms·
>> PHP has a reputation as a language that makes dead easy to write very ugly sphagetti code. I believe that programmers ability to write poor code is quite la
by gedrap 13y ago
>> PHP has a reputation as a language that makes dead easy to write very ugly sphagetti code.
I believe that programmers ability to write poor code is quite language agnostic.
- gizmogwai 13y agoFrom my personal experience, I disagree. I have seen a greater percentage of poor codes in languages that a lower entry barrier than those that require more initial investment. Most poor coders I've met are lazy coders (in the wrong side of it).
- gedrap 13y agoYes, there are plenty of crap coders and agree with your argument but, again, it's not really the language's problem. Actually, I believe it's quite opposite. It's a side effect of success. PHP was suitable for new programmers because of how easy it is to deploy, learn. PHP3, the first version of PHP which was widespread, was released during the dot com bubble. When everyone and their mums was into Web. Everyone started writing tutorials, passing their shitty skill set. to new developers. Which produced more crap developers.
- wwweston 13y agoI'd agree that PHP really isn't that bad (at least, from the perspective of someone who started writing web apps using C, Perl, and Java). Some missing or clunky meta/higher level features feel limiting to me, but more or less it seems to be as successful as its other dynamic scripting siblings when it comes to tools devs have used to ship. The big problem with PHP is that it grew to popularity as it grew into a turing-complete templating language, and the major paradigm for it was more or less the idea that documents are programs. That actually encouraged mixture of logic and presentation concerns. There are some other warts possibly worth railing at, but that's really the main place it gets its probably deserved reputation for having more spaghetti code, even though pros working in have long since moved on from that paradigm. FWIW, this is also its strength: it's a very short distance with a gentle curve from authoring documents to authoring dynamic documents. I don't think anything else matches it. Of course, the curve from there to a larger application, that can be a different story, depending on what kind of guidance one has (and most likely, without guidance, ontology will recapitulate philology, as they say).
- gedrap 13y agoI totally agree with you, it's not a perfect language. However, given the nature of 9/10 web applications (CRUD with some relationships between models), it does it's job just fine.