Earlier 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)…
>I think Python was popular as a general-purpose language first. What were their choices though, Perl? It's easy to see why Perl lost out. Other than PHP, I don't really know of any other JIT scripting languages they could have chosen.
Ask HN: Why did Python win?
241–250 of 856 posts
Re: Ask HN: Why did Python win?
#242Earlier quoted context omitted.
I figure if Django built an entire framework around metaprogramming, I'm going to do it to Django model objects as a form of vengeance.
I want to see the malicious wonders you can create!
Also overriding mro() is a fun way to monkey with the inner workings.
Re: Ask HN: Why did Python win?
#243Earlier quoted context omitted.
Before Python got popular, Perl was the most similar popular language. Once I encountered Python, I felt, this is Perl, but done right.
That was my experience. I like Perl. I'm comfortable with Perl. And after about a day of Python, I never wrote another line of new Perl code. There were so many "it can't possibly be that easy, but it is!" moments. Let's write a function to add five to a number: def add_five(num): return num + 5 OK. So, can I pass that function as an argument to another function? def call(func, value): return func(value) call(add_fiv…
A few years from now, when researchers look at mental workload when writing/reading software, we will have the data to prove that Guido was a Neuroergonomics savant.
Re: Ask HN: Why did Python win?
#244Python grew out of a myriad of applications that built on hard to replicate components, while Ruby relied only on web development which is remarkably subject to fashion. Python is very simple making it easy to learn. Thus, it became more and more popular for fields where programming is not the main task, like science. It is also very easy to extend with C. So, these fields could bolt on time-tested scientific code in…
> Python is very simple making it easy to learn. I would argue that there's little difference between them in ease of learning. I personally found Ruby easier because everything being an object with methods and no free floating functions felt more natural and easier to look up. i.e. string.length over Python len(string)
Re: Ask HN: Why did Python win?
#245Earlier quoted context omitted.
>I think Python was popular as a general-purpose language first. What were their choices though, Perl? It's easy to see why Perl lost out. Other than PHP, I don't really know of any other JIT scripting languages they could have chosen.
Perl and python have opposite philosophies with regards to standards. Python prefers a standard "pythonic" way, while perl had its "there is more than one way to do it". It would seem that having a standard is more popular.
Re: Ask HN: Why did Python win?
#246Python ended up 'specializing' in data contexts, thanks to Numpy / Pandas, and as a result, ended up becoming the first exposure to programming than anyone doing data stuff had. That was millions of people. In that space, it had no competitors. Ruby ended up 'specializing' in web dev, because of Rails. But when Node and React came out, Ruby on Rails had to compete with Nodejs + React / MERN as a way of building a web…
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)…
Re: Ask HN: Why did Python win?
#247Python ended up 'specializing' in data contexts, thanks to Numpy / Pandas, and as a result, ended up becoming the first exposure to programming than anyone doing data stuff had. That was millions of people. In that space, it had no competitors. Ruby ended up 'specializing' in web dev, because of Rails. But when Node and React came out, Ruby on Rails had to compete with Nodejs + React / MERN as a way of building a web…
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)…
Re: Ask HN: Why did Python win?
#248Ruby was never similar in popularity to Python. It was just a fad in webdev circles. I've rarely seen ruby before RoR and I've seen python all over. Python was popular as a teaching language, how it gained a foothold in academia. I remember 20 years ago when I was starting out it was popular for game scripting (Lua was more embeddable but python was also used). plenty of first class interfacing methods to native code…
Then in about 2005 I heard about zope, and how easy and wonderful it was compared to php. But it was slow and memory heavy.
In about 2008 more and more stuff started getting python bindings, specifically in VFX (where I was working). There was a tussle between javascript and python, and python won out, even displacing MEL and other domain specific languages.
Ruby was always more obscure to me, it was for people that likes C and wanted a more perl-y version of it, but without the anachy or the universality of CPAN.
I think the biggest reason was that it had loads of stuff in the standard lib, way more than anything else at the time. Much more than perl, so it meant that things were a bit more "portable". So people came for the stdlib, then started adding things to it because they'd spent all that time learning it.
Re: Ask HN: Why did Python win?
#249Earlier 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
Are there some exceptions? Sure.
Re: Ask HN: Why did Python win?
#250Earlier 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
Python has been really winning for some time, so it's natural that its ideological discipline has grown ragged. The crop of kids who value options above consistency don't have the scars of the Perl age to inform their prejudices.
But Python is -dramatically- better focused, as a community, on finding a Pythonic way to proceed, and then advocating it, than previous cultures.