Ask HN: Why did Python win?
671–680 of 856 posts
Re: Ask HN: Why did Python win?
#672The way I (somewhat hazily) remember it, Python was mainly competing with Perl as a scripting language, not Ruby as an application/web language. I started hearing about Ruby years later when Ruby on Rails drove the Web 2.0 movement, but that feels like a different era to me. Eric S. Raymond wrote an article[1] in 2000 about his experience trying Python after spending a lot of time with Perl. I'll quote some of it her…
I think it's kinda nonsense. No programming language is intuitive. It's arcane by nature. Having slightly more concise syntax saves you maybe a week of learning time. I used to write Perl about as fast as I could think because I had a lot of practice with it. I mostly do Python now, but do a lot less coding in general and I have to google syntax constantly. Python is less noisy, but it's not really more intuitive for…
The situation has changed now that having at least somewhat reasonable IDE integration is common. AI tools can also give you pretty good autocomplete.
Re: Ask HN: Why did Python win?
#673The way I (somewhat hazily) remember it, Python was mainly competing with Perl as a scripting language, not Ruby as an application/web language. I started hearing about Ruby years later when Ruby on Rails drove the Web 2.0 movement, but that feels like a different era to me. Eric S. Raymond wrote an article[1] in 2000 about his experience trying Python after spending a lot of time with Perl. I'll quote some of it her…
This is an accurate explanation. I started to teach myself Python just before 2000. The general consensus before then was that for a first language Perl or Python would be a good choice. Python was typically preferred because it was more approachable than Perl i.e more succinct. With no prior programming experience (besides manually typing out programs into my C64 as a kid) I managed to build a program that connected…
My dim memory of that time is that Python code was often longer than Perl, but that was OK because its selling-point was that it didn't have so many syntax edge-cases and it was easier to read. More things were actual words-for-humans as opposed to special symbols one had to memorize and apply according to special rules.
Re: Ask HN: Why did Python win?
#674Earlier quoted context omitted.
I think Python was popular as a general-purpose language first. After all, there was a reason people put so much effort into writing Numpy in the first place. I think a lot of people were attracted to the language design, as captured in the Zen of Python ( https://peps.python.org/pep-0020/ ), such as: Explicit is better than implicit. Readability counts. Errors should never pass silently (unless explicitly silenced)…
> There should be one-- and preferably only one --obvious way to do it. This is so hilariously wrong in python though
Sooner or later every sufficiently popular programming language is confronted with the dilemma of either breaking backwards compatibility and/or adding "alternative ways to do things"
Pathlib is an interesting one. It even has a correspondence table [1]. The introduction of pathlib made sense because it is just much nicer to use. But you couldn't drop the equivalent functionality in the "os" module for backwards compatibility. It's just far too widely used.
The is no magic bullet for this one. Either you accept introducing duplication in your language or you go through a hard change (f.ex. the Python 2 to 3 change).
The softest way to migrate might be to flag functionality as deprecated and give users a fairly long time (talking years) before dropping it. But no matter how much time you give the users there will be users who won't change until it's too late.
So there really isn't a winning path for this one.
[1]: https://docs.python.org/3/library/pathlib.html#correspondenc...
Re: Ask HN: Why did Python win?
#675Earlier quoted context omitted.
> There should be one-- and preferably only one --obvious way to do it. This is so hilariously wrong in python though
You're young enough to have never dealt with write-only Perl code ... Be glad.
How young does one have to be for that to be true?
As recently as 2017 I was employed at a place where there was a significant amount of perl code, as part of the build system (ugh) for the C code, and generating html (for some other system).
Re: Ask HN: Why did Python win?
#676Earlier quoted context omitted.
Not just perl, but C/C++/Java as well. Ruby was a competitor to Java JSP development back in the day. And I remember when a lot of Java people jumped ship to Ruby. I moved from C++ to python over a decade ago and never looked back. Back then, the python jobs were scarce -- but based upon how I picked up the language, many of the typical C++ issues just disappeared -- and I knew it was going to become popular. One com…
C++ and Python are not competitors. Sure both are Turing complete so you can implement anything in either. However if you should is a different question. Python is very difficult to maintain when you program goes over 100k lines of code, while the static type system of c++ is good for millions. C++ compiles to fast binary code, while Python is typically 60x slower for logic (though often Python calls a fast algorithm…
I see this argument a lot, but people often forget that Python is very concise (yet readable) compared to other languages.
100k LOC in Python typically contains way more business logic than C++, so it is only natural to be harder to maintain.
Re: Ask HN: Why did Python win?
#677No language ever won. When I started COBOL had won, not so today. Over the years various languages have won. Python is popular today for many but not all applications. That's about all you can say.
Python is clearly the current winner. Not sure being pedantic about what it means to be a winner adds anything
Re: Ask HN: Why did Python win?
#678Re: Ask HN: Why did Python win?
#679I 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 softw…
There 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…
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.
Re: Ask HN: Why did Python win?
#680Earlier quoted context omitted.
Why TF would you name an HTML parser BeautifulSoup?
I Googled it, apparently it comes from this https://en.m.wikipedia.org/wiki/Tag_soup