2 ms·
I was there when it happened, I remember it well. Python displaced Perl, when Perl was a dominant scripting language, way back in the 1990s. What motivated peop
by jandrewrogers 3y ago
I was there when it happened, I remember it well. Python displaced Perl, when Perl was a dominant scripting language, way back in the 1990s. What motivated people to replace Perl with Python is that we started using scripting languages for serious software with non-trivial complexity. In this context, Python was much more scalable and maintainable language than Perl, it was just an easier scripting language for software engineering purposes. I used to write apps in Perl and moved to Python for the same reason everyone else did.
At the time this was happening, neither Ruby nor JavaScript were credible alternatives, Python won by default. The only other scripting language I can remember being used in similar contexts at the time was Tcl.
The other half of it is that Python had a great C binding story, which made it easy to integrate Python with almost everything since C ABI was the lingua franca of interoperability. You could wrap high-performance code in a thin layer that would allow you to efficiently script it in Python. This is why Python became ubiquitous in HPC/supercomputing decades ago. It allowed Python to have a vast library of functionality with good performance and minimal effort by leaning on the vast number of C libraries that already existed to implement that functionality.
Another underappreciated advantage of Python, a bit like C++, is that it is promiscuous language. It isn’t so in love with its purity that it won’t happily do slightly dodgy things to hook up with things that were never intended to work together. It may not be pretty but you can actually make it work and the language doesn’t try to prevent it.
As time went on, a school of thought emerged that you could efficiently do almost anything you needed to do in software engineering with a combination of Python and C++. There is definitely an element of truth to that, and the ease with which you can combine those languages made them common bedfellows in practice.
Python initially won because it was better for writing complex software than Perl, but its staying power was based on its easy integration with literally everything.
- hadlock 3y ago> Python was much more scalable and maintainable language than Perl, This is a really excellent point. We were a Ruby/Golang shop and out of nowhere one of the sales engineers starts writing scripts in Perl. He wrote some really useful stuff, but the downside was that it was incomprehensible gobbldygook baked into 4 or 5 lines, and completely unmaintainable by anyone other than the original author. After he left we decided to rewrite all his code in Python/Ruby based on the general idea of what we wanted the inputs and outputs to be, rather than assign anyone to maintain the actual Perl code. Vs the 8-year-old analytics/data science codebase I had to unwind a couple years back, was written entirely in Python and was easily understandable from the first line and had been maintained by no less than six people over that time
- theshrike79 3y agoPerl being write only isn't a meme, it's actual reality. It is _possible_ to write readable and elegant perl, but it requires huge amounts of skill and self control not to mush everything into essentially a 3 line regex that happens to work =) And in for Python there is the 13th rule of the Tao of Python: "There should be one-- and preferably only one --obvious way to do it." The language is built around pushing you to do things a certain way, it doesn't force you, but the correct way is usually the easiest and cleanest way.
- demondemidi 3y agoThere was a brief period of schools teaching Java compiling down to CLI programs in Unix (beans?). Perl was popular on the semiconductor world replacing tcl for gluing together complex manufacturing flows. Ruby was heading to be a replacement for Perl with bidirectional file handles and similar syntax. Shell scrips and Perl are still on use there. Python never made inroads because it brought nothing new and was less suited to file munging than Perl. Perl still has superior text manipulation semantics compared to python.
- jandrewrogers 3y agoText manipulation was Perl’s raison d’être, it was exceptional at it. The real legacy of Perl is how pervasive its text manipulation concepts have become in other software. That was what made it work so well in the early days of the Web: everything Web was text-based. Perl would probably still have a place at the table if Perl 6 hadn’t turned into a debacle over an astonishing number of years.