5 ms·
>And who cares about that, in turn? Anyone who has to maintain bad PHP code, for starters.
by mistercow 13y ago
>And who cares about that, in turn?
Anyone who has to maintain bad PHP code, for starters.
- PavlovsCat 13y agoIf any other programming language was as popular, there would be just as much bad code in it. Nothing about PHP forces you to write bad code, nothing about other languages forces you to write good code. Also, if PHP is really just sucky and offers no advantages, why not simply rewrite it in a better language? Surely the costs would ammortize quickly.
- mistercow 13y agoI don't dispute that people will write bad code in any language. The problem I have with PHP is that it at best, makes it exceedingly easy to write bad code, and at worst has actually encouraged it (see, for example, magic quotes). I also am not claiming that PHP offers no advantages. Certainly it has some good things about it. The choice to allow you to easily interleave PHP code with HTML is an example of a simple feature which makes life really easy when you're setting up a site. But rewriting in a better language is not necessarily a viable option. It's generally not the call of the person tasked with maintaining it, and even if it is, "cost will amortize quickly" isn't necessarily good enough on a large project with limited funding.
- jtreminio 13y ago> actually encouraged it (see, for example, magic quotes). Actively discouraged for years, and removed completely over a year and a half ago.
- mistercow 13y agoYes I know, I was just pulling out a random example that came to mind. Still, you'll find a lot of code out there running on old versions of PHP with magic quotes enabled. And that's another part of the problem: the incorporation of really bad ideas that end up poisoning code bases for years to come, simply because they weren't properly vetted before being released.
- Killswitch 13y agoI see more people complaining about maintaining bad code in other languages than I do about maintaining bad code in PHP. I personally have been a PHP developer since 2001, I haven't maintained any bad code... Actually, I spent a good portion of my early career completely rewriting shitty PHP code to be good PHP code.
- eropple 13y ago> I haven't maintained any bad code... >I spent a good portion of my early career completely rewriting shitty PHP code to be good PHP code. I'm curious what you think maintenance is.
- Killswitch 13y agoRewriting the system from the ground up, not maintaining the current code base. Sorry I wasn't so exact on that.
- cpeterso 13y agoCode maintenance (of good code or otherwise) is a sign of success. Rewriting everything is not.