Live data from Hacker News

Ask HN: Why did Python win?

news.ycombinator.com

41–50 of 856 posts

Re: Ask HN: Why did Python win?

#41
Python had significant traction back in the late '90s (~1.4/1.5). It was perl vs python vs TCL (possibly vs Guile) back then.

Cross platform and the ease of integrating to other codebases (both extension and embedding) are two parts. Perl's transition to Perl 6 seemed to hurt/fragment that community more so than python 2000 did to python. TCL seemed to slowly die except for a couple niche applications - possibly expedited by Sun's slow demise. Guile never really ran well on non-*nix systems.

Fundamentally python had more C/pascal flavor than Ruby's smalltalk's flavor. That made it easy to teach/adopt. A couple big name universities moving from scheme to python for intro CS helped too.

Re: Ask HN: Why did Python win?

#42
In scientific computing, Python also "won" versus R, primarily because of the deep integration with SWE concepts and the ability to wholesale lift concepts from other languages through the ecosystem.

I'd argue numpy/pandas are so fundamentally different from base python that you need experience in those as well.

Re: Ask HN: Why did Python win?

#43
Readability. The most important thing for code is to be comprehensible by developers. Python has several factors contributing to readability. White space as syntax is the most obvious thing. More than that, unlike Perl which has more than one way to do things Python tends to have one or maybe two canonical ways of accomplishing common tasks. This makes it easier to navigate code without having much experience. Python was also good at interfacing with existing libraries from the start so a lot of work got scripted quickly in Python using high powered C libraries. Arguably being able to work with popular C interfaces was yet another factor contributing to generally high readability of code.

Re: Ask HN: Why did Python win?

#44
post #10

Python 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…

I agree. I've seen Python being taught in Physics and hard science university cursus as an introduction to programming 15+ years ago.

When I was at CERN in 2003 - 2004, it was when the first set of Python introductory courses started.

The build infrastructure for ATLAS used the CMT tooling, written in Python.

The Summer School of Computing 2004 had several sessions related to Python in the context of grid computing.

Re: Ask HN: Why did Python win?

#45

Languages that won, win, and will win are all of those that are moving towards being smart, in the sense that the compilers/transpilers infer what the programmer is trying to do and generate the appropriate code under the hood. The future of programming is describing the majority of programs in something thats even closer to English, and then fine tuning it with something like python, all of which will result in nati…

People have been making similar predictions longer than either of us has been alive. Remember Cobol? Basically that. 5th generation languages? Same thing, with a different definition of "describe". Ultimately, those all turned out to be dead ends while the "antiquated" languages kept improving and innovating, albeit usually by (re-)inventing things that already existed elsewhere.

You are mistaking syntax for features.

C++ got popular because it managed data structures under the hood automatically. I.e, you didn't have to keep track of memory offsets or function pointers.

Java got popular because it did that and also managed memory allocation under the hood automatically.

Python (and Javascript) got popular because it did all of that and also managed types under the hood automatically.

The future is exactly this. Some language (or Python 5 or 6) is going to do all that except manage common processing algorithms for you automatically. For example, you will not need to import a library to convert xml to json, the .toJson call will be put through an AI inference algorithm that will essentially generate the required code for you on the fly, and more then that, it will do it in a much optimal way because it will recognize that the xml data follows a particular structure so it can optimize the search of the tags rather than doing a generic approach.

Re: Ask HN: Why did Python win?

#46
Python kind of had three things that really mattered, an culture of “one correct way”, an invisible but conservative type system, and an style guide build into the language an dictated from the language designers in the form of significant whitespace and PEP-8.

Ruby could have been a contender but still had some of the “there is more than one way to do things” left over from perl(ruby was kind of an pragmatic alternative to the “real soon newer” of perl6) and it’s a bit more dynamic than python in how it handles variable internally.

And the field of academic data crunching was hurting badly from the fact that the two only viable options for most entry level researches was Excel/VisualBasic or PERL so everyone wanted some level of structure which the python community led by Guido provided, once people begun to settle on bumpy and pandas.

And pythons popularity definitely grows from the fact that it’s what non programmers learned as an alternative to Excel/SPSS/SAS/Matlab(all of whom are expensive proprietary tools) in classes focused on analyzing data.

Re: Ask HN: Why did Python win?

#47
post #31

I first encountered Python around 2000. At the time Perl was more popular in the circles I frequented, and TCL probably about as popular as Python (eggdrop[1] notwitstanding), but Python was growing steadily. I encountered Ruby in the late '00s (as others have noted it made its english-language debut almost a decade after Python started) and Lua was another contender during this time. My memory is that, at least outs…

I think it upset the Perl hegemony in part because of the enterprise infatuation with object orientation. Perl got a lot of flak from the Java/XML crowd (“Perl’s not a real language—it’s not object oriented!”). You could kind of write Java in Python, and thus a certain kind of enterprise techie couldn’t dismiss Python as “just” a scripting language.

And of cause the fact that the Perl community relished in inventing new and exiting shorthand tricks that allowed perl script to be essentially write only unless you stuck to an style-guide that had not been codified.

Perl like VisualBasic had a well deserved reputation for facilitating atrocious hard to debug code, and it was this reputation more then the lack of OO/XML support that led both of those to fade back into the realm of forgotten memory and business critical enterprise applications that nobody dares to touch.

Re: Ask HN: Why did Python win?

#50

Python got Numpy very early on, and other languages never got an equivalent. And then lots of things were built on top of Numpy - image processing, reading GIS raster data, scipy, pandas, etc etc - and they're all trivial to combine because it's all just Numpy arrays. Python also had a very friendly and approachable community from the start, and great docs, while Ruby had its documentation in Japanese only for some t…

Rails is far, far more popular than Django.

However, the significance of both declined with the expansion of high-tech options (Spring, Go, Scala, Node.js) and the expansion of low-tech options (Firebase).

So today the popularity of the backend frameworks of each language are less important.

Post reply on HN