3 ms·
> Students are taught it, a bunch of libraries were written for it, now everyone keeps using it. This is revisionism. When I was in school, that's what people
by BeetleB 1y ago
> Students are taught it, a bunch of libraries were written for it, now everyone keeps using it.
This is revisionism.
When I was in school, that's what people would say about C/C++/Java.
People like me switched to Python well before it became common to teach it at school. Lots of great libraries were written in it before then as well. I mean, it's really easy to write a library in it than it was in most other languages.
It was picked for teaching in schools because it was a decent language, and was already widespread. It's much more useful to teach Python to an average engineering student than C/C++/Java.
It became popular because it was easy to learn, and a lot nicer to use than the other big scripting language: Perl. When I was in grad school, I would routinely find non-engineers and non-programmers using it for their work, as well as writing libraries for their peers. There is no way they would have done that in any of the prevailing languages of the time - many of them learned to program while in grad school. It became quite popular amongst linguists. Then NumPy/SciPy became a popular alternative to MATLAB, and once again my peers, who would never write C++ to do their work, were suddenly getting matching speed by using Python. That's how it ended up being the language for ML.
So no - the fact that it's taught in schools is not the reason it's used today.
- internetter 1y ago> It became popular because it was easy to learn, and a lot nicer to use than the other big scripting language ... I would routinely find non-engineers and non-programmers using it for their work, as well as writing libraries for their peers. ... many of them learned to program while in grad school. Sure, and this is my argument. It is easy to start out with, which makes it appealing to academics without a CS background. But is this a good thing? Because then these academics without a CS background write monstrous, poorly optimized scripts compounded by a slow language, then use drastically more compute to run their science, and then at the end publish their paper and the scripts they used are very hard to adapt to further research because very rarely are they structured as modules. Just because it is easy to write doesn't mean it is the most appropriate for science. It is not commonly acceptable to publish papers without a standardized format and other conventions. Students put in work to learn how to do it properly. The same should be true for code.
- BeetleB 1y ago> But is this a good thing? Because then these academics without a CS background write monstrous, poorly optimized scripts compounded by a slow language, then use drastically more compute to run their science, and then at the end publish their paper and the scripts they used are very hard to adapt to further research because very rarely are they structured as modules. For many of them, the alternative is that they simply wouldn't have done the science, and would have focused on research that didn't need computation. Or they'd use some expensive, proprietary tool. Prior to Python becoming popular among them (circa 2005-2007), plenty of good, fast, whatever-metric-you-want languages existed. These academics were not using them. Python is really what enabled the work to be done.
- nickpsecurity 1y ago"This is revisionism." Is it? I've never actually seen or heard exactly how Python became popular with survey data at many institutions. If it exists, I'd like to read it sometime. Most languages got popular due to a specific project or product getting popular or a specific company marketing them. I've heard it was UNIX/C, Browser/JavaScript, Sun/Java, Microsoft/many (esp C#), Google/Go, Apple/Objective-C, Apple/Swift, Ruby/Rails, and so on. I've heard variations of C++ being like this but also useful building on C ecosystem. Some were really great at a specific thing they made easy. PHP might be like that. I don't have its history, though. Flash was definitely like that. So, did Python have a killer app or library that caused it to take off industrially? Or did that not matter? You mentioned NumPy/SciPy in academia.
- BeetleB 1y ago> Most languages got popular due to a specific project or product getting popular or a specific company marketing them. This is a bold assertion, and IMO, false. What was the killer product/company marketing that made Perl popular? > So, did Python have a killer app or library that caused it to take off industrially? Or did that not matter? You mentioned NumPy/SciPy in academia. It really didn't. It was already popular before, say, Django came around. Yes, NumPy/SciPy are kind of the reason ML is on Python, but the reality is people in academia chose NumPy/SciPy over MATLAB because it allowed them to use Python libraries in their code, which MATLAB could not. In other words, the academics chose to use NumPy/SciPy because they already were into Python. For many, Python was just a much nicer alternative to Perl, and it was one of the main "batteries included" languages. That's why it became popular. Keep in mind that Python did not become popular quickly. It came out in 1990 and took about a decade to become somewhat popular. The only other thing I can think of is this essay by Eric Raymond in 2000: https://www.linuxjournal.com/article/3882 https://www.linuxjournal.com/article/3882 "My second came a couple of hours into the project, when I noticed (allowing for pauses needed to look up new features in Programming Python) I was generating working code nearly as fast as I could type. When I realized this, I was quite startled. This was my first clue that, in Python, I was actually dealing with an exceptionally good design. Most languages have so much friction and awkwardness built into their design that you learn most of their feature set long before your misstep rate drops anywhere near zero. Python was the first general-purpose language I'd ever used that reversed this process. ... I wrote a working, usable fetchmailconf, with GUI, in six working days, of which perhaps the equivalent of two days were spent learning Python itself. This reflects another useful property of the language: it is compact--you can hold its entire feature set (and at least a concept index of its libraries) in your head. C is a famously compact language. Perl is notoriously not; one of the things the notion “There's more than one way to do it!” costs Perl is the possibility of compactness. ... To say I was astonished would have been positively wallowing in understatement. It's remarkable enough when implementations of simple techniques work exactly as expected the first time; but my first metaclass hack in a new language, six days from a cold standing start? Even if we stipulate that I am a fairly talented hacker, this is an amazing testament to Python's clarity and elegance of design. There was simply no way I could have pulled off a coup like this in Perl, even with my vastly greater experience level in that language. It was at this point I realized I was probably leaving Perl behind. ... So the real punchline of the story is this: weeks and months after writing fetchmailconf, I could still read the fetchmailconf code and grok what it was doing without serious mental effort. And the true reason I no longer write Perl for anything but tiny projects is that was never true when I was writing large masses of Perl code."