Live data from Hacker News

Ask HN: Why did Python win?

news.ycombinator.com

181–190 of 856 posts

Re: Ask HN: Why did Python win?

#181
post #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…

I agree the language is very readable overall but I find the whitespace based syntax less readable and practical compared to just using curly braces. Editors can color matching pairs, let me jump between start and end of a scope, select all lines between two braces etc and all that just doesn't work in Python. Also I find it more difficult to see where a scope ends. It has upsides too and is not a huge deal but I often wonder why people prefer this so much.

Imho the reason for Python's success is mainly how easy and quick it is to learn, and how little time it takes to get something running. That alone removes so much frustration and perceived effort.

Re: Ask HN: Why did Python win?

#182
post #68

Earlier quoted context omitted.

> When I first encountered Python, it was as an alternative to Perl. Me too I am amazed that Python won out against Perl Perl is much easier to use. Does not have the incredibly irritating treatment of whitespace Perl was a disrupter, whereas Python was "computer sciencey". A false dichotomy but it really mattered to people

Perl being easier to use is a joke... Ruby suffers the same issue as Perl does - you can do the same thing a million different ways, that's too many.

a million different ways, but all with liberal use of human-unfriendly symbols like dollar signs, at signs, pound signs, etc.

Re: Ask HN: Why did Python win?

#183
post #171

Good timing, our company is in the midst of migrating from Go and JS over to Python. I'm struggling with this. Yet, most developers feel they will be happier writing Python for our web application. I don't know why Python has outshined its contemporaries like Perl, PHP, Java and Ruby. It has done a great job, and there is probably much to be admired.

Wait you're moving to Python? I hope you have benchmarked it.

Re: Ask HN: Why did Python win?

#184
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.

I (rather to the displeasure of many people) refer to that kind of OOP Python as "Java fanfic"...

Re: Ask HN: Why did Python win?

#185
I remember when python started, perl was there, and when I wanted to write scripts for some pentesting, perl was the choice over python. But I think the whole “data scientists” crowd is what made it popular and mainstream, they are usually non-programmers, and looking for an easy way to manipulate the numbers, speed or performance isn’t really the priority, that use case is fair, what is not good is the other crowd, people who want to use python for everything and shove it everywhere, backend!? Sure, embedded?! Absolutely, heck even frontend I saw some are trying to use it and marketing it “pure python”.. even ML I believe we would be at a better stage of Python wasn’t the main tool used in that domain.

I can’t say much about ruby, barely used it, but if I were you I will look at Go, it’s definitely better than Ruby and still ahead in terms of performance, not the top one but for its easy of use, it is probably the best choice.

Re: Ask HN: Why did Python win?

#186

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…

> Ruby relied only on web development Chef, Puppet, Vagrant, Logstash, etc are not web development. Ruby dominated (dominates?) DevOps tooling.

YMMV, but I've only seen Rails fans use any of those.

Re: Ask HN: Why did Python win?

#187

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…

It never seemed to me that "ADD 1 TO COBOL GIVING COBOL." was a good idea. (FORTRAN, on the other hand, made a lot of sense.)

Re: Ask HN: Why did Python win?

#188
post #154
post #76

Earlier quoted context omitted.

Numpy is certainly amazing, but there are tons of competitors in the data/scientific space, which pure "A-type" data scientists tend to prefer: R, SSPS, Matlab... The difference is that Python doesn't entirely suck as a general-purpose language. Sure, you might have better options, but it's still reasonable to write almost anything in Python. Other scripting languages like Ruby, JS and Lua are probably a little bit b…

numpy exists (somewhat indirectly) because matlab cost $$$. and now numpy is a far larger use of matlab's concepts than matlab will ever be. I haven't seen anything an "A-type" data scientist needs in R/SAS/SPSS that was intrinsic to the language and couldn't be ported to Python. I don't want a "data/scientific" language, or a "web" language, or a "UI" language- I want one language that explicitly supports all the us…

> I haven't seen anything an "A-type" data scientist needs in R/SAS/SPSS that was intrinsic to the language

Not intrinsic to the language but in terms of the ecosystem, for a purely A-type data science workload R is significantly better. dplyr + ggplot vs. pandas + matplotlib isn't even remotely close.

Now, obviously in the real world nothing is ever purely model work, which is why Python more than makes up for the difference.

> I don't want a "data/scientific" language, or a "web" language, or a "UI" language- I want one language that explicitly supports all the usecases well-enough.

Me neither. *taps sign*

>> The difference is that Python doesn't entirely suck as a general-purpose language.

Re: Ask HN: Why did Python win?

#189

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

I'll bite on "just a fad in webdev circles", in case you are serious and not trolling. Railsworld is celebrating the 20th anniversary of Rails this year. As I'm sure you know, Rails is built on Ruby. 20 years does not fit my definition of fad.

Mh. Honestly, I've encountered ruby in about 3 primary ways. RoR and Sinatra, which are kinda the same webdev thing, and Chef as a config management. There are additional things, but more supporting things - Rake and Capistrano as deployment systems, Berkshelf and such as supporting things.

Outside of this, it's been perl and python, with python replacing perl after that whole perl 6 fiasco while the language and distros started understanding packaging python.

Post reply on HN