4 ms·
The fact that PHP was, in the era of shared hosting accounts, the default scripting language was like a slingshot maneuver around the sun. It's hard to underst
by fatbird 6y ago
The fact that PHP was, in the era of shared hosting accounts, the default scripting language was like a slingshot maneuver around the sun. It's hard to understate the incredible momentum that surge of casual users brought to it that no other language received, and has sustained it over the long, painful modernization that was needed to make it relevant today. More than PHP, we're still using platforms that were begun in that era: WordPress, Drupal, etc. There's still Zencarts out there.
It's more remarkable that Python is still relevant, which is a testimony to the overall quality of its design and its usefulness in a large number of different areas. Had Python been only a web scripting language, it would have been eclipsed by PHP just like Perl.
- deleted 6y ago[deleted]
- cutler 6y agoI don't know about quality of design. Python's popularity is largely due to how much it dumbs down and being a first mover in the scientific world. Python has no built-in regex support and its crippled lambdas are nothing more than the indulgence of its BDFL who has a bias against functional programming. Compare that with Matz's approach to language design.
- acdha 6y ago> Python has no built-in regex support Are you basing this claim on something like not having a special literal syntax? Python has had regular expression support for ages and it works quite well: https://docs.python.org/3/library/re.html https://docs.python.org/3/library/re.html
- cutler 6y agoYes, I'm comparing it to languages which have regex operators (Perl, Ruby) and where you don't have to `import re`.
- acdha 6y agoOkay, so that's a somewhat different claim and it really comes down to how much you care about an operator versus a extra couple of characters. Most programmers know how to touch-type and do not hammer out regexps so quickly that the difference between: $foo =~ s/foo/bar/ and foo = re.sub("foo", "bar", foo) is a significant factor in deciding which language to use, especially since there are legibility tradeoffs (i.e. escaping) and the Python approach for handling e.g. groups is cleaner for non-trivial code and avoids the chance of accidentally clobbering $1, $2, etc. — a bug pattern I've seen affect people more than once. Personally, if I were advocating Perl I'd probably go with angles like the extended capabilities or more complete Unicode support which Python users need to get from the regex module (https://pypi.org/project/regex/ https://pypi.org/project/regex/).
- Daishiman 6y agoHaving been raised into the profession at a time when both Perl and Python were strong, the amount of times I have had to reach for regexes as a frequent solution to a problem is so rare that I can hardly see how it's a problem. It's about as much of a problem as not having built-in linear algebra operators.
- fatbird 6y agoI thought this as well but didn't want to get sidetracked on a specific. Perl was one of my first languages and regexes were one of the big tools I started using, while I was processing text files. Once parsing lines of ASCII stopped being my major task, regexes stopped being a frequent tool.
- fatbird 6y agoArguably, that's good design, at least in terms of actual success. Where is Ruby relative to Python? "Dumbed down" means good pedagogical language--it's always had an advantage there as well in scientific computing. And the strength of its design is seen in the fact that it's still used by very experienced/advanced users. Also, it wasn't a first mover in scientific computing--Matlab and Maple were around long before numpy. Matlab dates from the early 80s; numpy from 2005. Python has stolen a lot of mindshare from Matlab with numpy and scipy and Jupyter. Even today I help PhDs switch from Matlab to scipy. Personally, I've always liked the ethic of Python that there's only one way to to do it, normally. It means the boilerplate code looks the same everywhere, and when you break the "rules" of that one way, you do it with a reason, a conscious justification, rather than as a stylistic flourish or an idiosyncratic preference.
- rualca 6y ago> Python's popularity is largely due to how much it dumbs down and being a first mover in the scientific world. Python is obviously not "a first mover in the scientific world" as Matlab precedes Python for over a decade and is still the de facto tool of the trade pretty much everywhere except ML. And please don't misrepresent UX as "dumbing down". If anything, Python does right far more things that other languages do blatantly wrong and even in a user-hostile way. > Python has no built-in regex support This argument reads like a blatantly desperate attempt to find any thing at all to try to get Perl's leg over Python. Meanwhile, no one ever complained about Python's re module not doing its job, and Python is extensively used pretty much everywhere, involving regex or not.