4 ms·
Python won because people who knew math/science domains only knew Python (or it was the best they knew). And so they made libraries for Python. And it propoga
by blunte 5y ago
Python won because people who knew math/science domains only knew Python (or it was the best they knew). And so they made libraries for Python. And it propogated like many other bad ideas based on ignorance.
Python is a miserably bad language for modern times. If you know any of half a dozen other languages, then you understand.
There was a good essay, from Paul Graham?, about the ladder of awareness of programming languages. Unfortunately I can't find it now.
The point is, Python has won and is frankly terrible. It has inconsistent features, but it has an awkward OOP approach (in a time when OOP is finally being recognized as bad itself), as well as seriously lacking basic language features which are only appearing as of 3.9 and 3.10.
Frameworks like Django and Django Rest Framework expand on these bad ideas, creating monstrosities which make the PHP code of yore look arguably decent.
Sadly, I don't think there's any way to kill this. The only option is to vastly outperform the Python people and produce reliable, readable, performant solutions in half the time and beat them to market. Perhaps someday they will die off.
- travisjungroth 5y ago> Python won because people who knew math/science domains only knew Python. This doesn’t explain why they knew Python in the first place, a pretty critical step. It reached popularity without a platform mandate (JS, Swift) or corporate backing (Java, Go) so there’s something going on.
- blunte 5y agoPython has a lot of great libraries. It's the inverse of the chicken-egg problem. Because there are now some critically important libraries (pandas, numpy), it means that is the obvious starting place if you want to hit the ground with minimal effort. I think that's totally fine for uni. But there should be a capstone level class for data/ai scientists before they can graduate which shows other languages and teaches some general best practices of software development. There are plenty of other languages which can do the same job. And honestly, the algos which are available can be recreated if they don't exist. Most of it is not "rocket science". But the greater problem is that Python itself is a poorly designed and warty language. Whether a scientist or not, choosing Python means fighting these warts. No amount of make-up can cover some of these; and plenty of other languages start with clearer foundations.
- jasode 5y ago>This doesn’t explain why they knew Python in the first place, a pretty critical step. >>Python has a lot of great libraries. [...] But there should be a capstone level class for data/ai scientists before they can graduate which shows other languages I didn't downvote your gp reply but your answer just pushes the question to an earlier point. Why did early earlier 1995 programmers at science labs like David Beazley and Jim Hugunin (who already knew "other languages" such as C Language, assembly, Fortran, etc) ... choose Python as the scripting wrapper for their C code? See my other comment about their earlier history: https://news.ycombinator.com/item?id=30813528 https://news.ycombinator.com/item?id=30813528 The "Python having a lot of great libraries" wouldn't have been a compelling reason for David Beazley since those earlier creators of scientific packages for Python chose Python before it had a lot of scientific libs. They were among the very first. Here are some bullets from another deep link at a different point in the video[1] : - David's first attempt writing his own homegrown scripting language. - he also looked at alternatives like Tcl/Tk and Perl and they weren't as appealing as Python. - David mentioned Python had a more powerful REPL. - Python was also open source C code so he could easily modify it to run on the Thinking Machines CM-5 computer[2] in the physics lab - wanted a language & runtime that encouraged the wider community to build more science tools In your opinion, what was the superior programming language that David Beazley and Jim Hugunin should have chosen in 1995 that checks all the bullet points above? [1] https://youtu.be/riuyDEHxeEo?t=42m43s https://youtu.be/riuyDEHxeEo?t=42m43s [2] https://www2.cisl.ucar.edu/supercomputer/littlebear https://www2.cisl.ucar.edu/supercomputer/littlebear
- blunte 5y agoPython is more accessible in modern times than C, assembly, and Fortran. But we are SO far past that now. My argument isn't for what should have happened in 1995, it's for the complacency which has allowed Python to become the top 1 or 2 language in 2022. It's like having proximity detectors on the back of your car, but you still start the vehicle with a crank at the front. We can do better; we have the technology.
- ComradePhil 5y ago> only knew Python (or it was the best they kne) One of the reasons for them knowing it in the first place was false marketing that python "reads like English" (as if that would be a good thing). The problems with these really smart people is that they hate not knowing everything... and lot of them a decade or two ago were never exposed to programming before they started doing research... so when they hear that it "reads like English", they feel that they can conquer it... eventually, being the smart people they are, they learn enough to get their jobs done... and some of them learn it quite well, while some others write terrible code that somehow works but they themselves don't quite understand why. But most of them would not take on another language unless someone comes up with a false claim that "it is easier than English" or some bs like that.
- blunte 5y agoAt one of my previous companies we hired a really intelligent (generally) and very likeable data scientist who arrived and wrote the worst Python I've seen. Actually it wasn't the worst, because it was all inline copy/paste code rather than convoluted OOPish code. He could solve very complex problems, but his tooling was horrible. It wasn't his fault. He had solid education from a German STEM uni (with PhD.), but there was a serious lack of programming skill. It would seem that because Python is "so easy" to get started that people don't feel they have to bother with learning any real programming skills beyond solving their immediate problem. I don't blame this on the scientists; software is not their domain. The problem is with PHBs who don't know better and who make decisions based on the toolset used by the "special" people.
- zozbot234 5y ago> One of the reasons for them knowing it in the first place was false marketing that python "reads like English" (as if that would be a good thing). Sounds like the story of BASIC (and a bunch of other early languages besides - BASIC was originally a simplified variety of FORTRAN, with a REPL terminal-driven workflow tacked on as a key innovation), except that Python is a lot more semantically complex than BASIC, even at a novice level. Perhaps we might use some development tools that can make, e.g. Rust read "like English", too. (After all, the Rust compiler diagnostics literally read like nicely-phrased English, so extending the same approach to the rest of the language representation has some meaningful precedent.) Then novice scientists might learn to program by tweaking their code and reading what it actually means, pretty-printed in nice English language.