4 ms·
PHP also didn't make the mistake Perl did. A shame because Perl tried very hard to make the right thing easy with security.
by wbl 8y ago
PHP also didn't make the mistake Perl did. A shame because Perl tried very hard to make the right thing easy with security.
- dexen 8y agomake the right thing easy with security. All other things being equal, security is usability[1] anti-pattern. You don't get to make clever hacks (in the original sense) on a secure system. Unix was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. - Doug Gwyn -- [1] at the very least for a power user or a developer
- ptx 8y agoPHP was not really designed, though. It grew accidentally from a templating system. When other systems are said to be more secure, I think it's meant in the sense of not being horrifically broken and routinely injecting untrusted input into namespaces, markup and SQL queries.
- pjmlp 8y agoJust like C grew accidentenly from a language created to bootstrap compilers and JavaScript was a hacky 10 day solution.
- ptx 8y agoWikipedia quotes[1] Rasmus Lerdorf as saying: "I don't know how to stop it, there was never any intent to write a programming language [...] I have absolutely no idea how to write a programming language, I just kept adding the next logical step on the way." Another relevant quote: "I'm not a real programmer. I throw together things until it works then I move on. The real programmers will say 'Yeah it works but you're leaking memory everywhere. Perhaps we should fix that.' I’ll just restart Apache every 10 requests." And: "For all the folks getting excited about my quotes. Here is another - Yes, I am a terrible coder, but I am probably still better than you :) " ...which is probably true, but all the more reason to use tools that work properly rather than encouraging me to build more poorly thought-out stuff on top of a broken hack. [1] https://en.wikipedia.org/wiki/PHP#cite_ref-itconversations_16-0 https://en.wikipedia.org/wiki/PHP#cite_ref-itconversations_1... [2] https://en.wikiquote.org/wiki/Rasmus_Lerdorf https://en.wikiquote.org/wiki/Rasmus_Lerdorf
- cutler 8y agoPerl's decline relative to PHP is a bit more nuanced. With mod_perl you had to be really careful with global variables otherwise another process could access them in memory. Mod_php did a better job of isolating processes so mod_perl gained a reputation as a security headache which most cheap hosting companies were not prepared to deal with. It's often overlooked that a lot of cheap hosts only offer PHP as a CGI so the benefits over Perl/CGI appear, at first glance, to be minimal but even as a CGI PHP has templating built-in where Perl, Python and Ruby don't. Perl only has CGI.pm when limited to CGI. Sure, you can try to run Perl web frameworks such a Mojolicious, Dancer and Catalyst under CGI but they're not going to compete with PHP since they don't run as drop-in templated pages. Perl did have a PHP clone - HTML::Mason - but it wasn't worth using unless you ran it with mod_perl. That's where Perl lost to PHP. When PHP gained full OOP support with PHP5 the Perl community was still tearing itself apart over introducing a MOP and which of the dozen Moose clones should reign supreme. That was the final nail in Perl's coffin, at least in it's bid to compete with PHP.
- simias 8y agoWhat's that mistake?
- wbl 8y agoPerl 6. You think Python 3 was bad?
- lizmat 8y agoHave you looked at Perl 6 recently?
- wbl 8y agoThe issue isn't the language which is great. The issue is with the development hell sapping resources from the community
- arbie 8y agoI think it's a given that Perl6 will not achieve the prevalence that Perl5 has.
- b2gills 8y agoIt's pretty much a given that no language will ever be able to achieve that again.
- simias 8y agoAh, of course. But IIRC Perl usage on the web already started to decline (mainly in favor of PHP) before the whole Perl 6 debacle. I think PHP's strength was also its weakness: an amalgamation of specialized functions thrown into a global namespace without having to bother with modules, CPAN or anything. If you're an experienced dev it looks like a huge mess but if you're a complete beginner it makes it easier to work with.