Live data from Hacker News

Ask HN: Why did Python win?

news.ycombinator.com

731–740 of 856 posts

Re: Ask HN: Why did Python win?

#731
post #719

[flagged]

I've checked the article and the comments are awesome, not sure what you're talking about. People disagree with you, respectfully, explaining why they think you're wrong. What did you expect from the "welcoming" community, ignoring the critique?

Not ignoring, but taking it seriously without demagogy and trying to prove that 2+2 equals to five.

Re: Ask HN: Why did Python win?

#732
Can only speak from my experience. I learnt to program in C++ as part of a Physics degree and then went into research. At the time, people mostly used MATLAB or Mathematica for interactive stuff and C/C++/Fortran for higher performance bits. Mathematica was never paid for by the University while I was doing my PhD which meant I had to pay for it out of pocket, and MATLAB was clunky to do anything not matrix based.

I started using Python just after version 2.7 came out because someone told me to download Enthought Canopy (a precursor distribution of scientific libraries for Python, like Anaconda is now) , "Hey, you can use Matplotlib and Numpy and get 90% of the way there by barely modifying your existing code". Then I came across things like FEniCs (finite element simulation framework) which didn't have a real equivalent in MATLAB/Mathematica world and which C++ world tools were difficult to use and tended to require a custom programming language.

After leaving research I've worked as a developer and keep coming back to Python. Currently I work in web and use Django in my day job. I'm super comfortable and productive in the language.

Re: Ask HN: Why did Python win?

#733
post #20

It has very little to do with Python itself. Python won because GvR ran an extremely tight ship. And there were many extremely talented core developers that helped make Python a polished product. The development team made all the right decisions, except for rejecting PEP 355 which was a big mistake. The batteries included approach helped grow the ecosystem. Developers wrote third party libraries in the hopes of them…

> Python also came in an msi installer and made the Windows experience pleasant For a long time, the official Windows Python distribution was overshadowed by ActiveState's, called ActivePython. That included more Windows-specific packages such as win32com, and the very capable PythonWin IDE from Mark Hammond. That was my go-to Python around 2000-2005. ActiveState was also notable in the early 2000s for hosting the Py…

That and Enthought Canopy, which bundled Spyder, SciPy, NumPy and came a bit later but before Anaconda

Re: Ask HN: Why did Python win?

#734

[flagged]

You are not asking for help. The comments on your critique are patient, and explain how to look at things different. Just because people disagree, does not mean they 'attack's you. Honestly, your critiques seem more like opinions. The comments are pretty spot on that these are not issues. Your perspective on the default data types is off though. This is not an attack. I simply disagree with you descriptions and opini…

[deleted]

Re: Ask HN: Why did Python win?

#735
post #676

Earlier quoted context omitted.

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…

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

Python ismuch less concise at this size. Sure your algorithms are more concise, but you lose all of that and more because it you don't have 100% test coverage you never know when a stupid typo will make your program crash, while with c++ you typically can be fine with more reasonable coverage, say 80% where the last 20% is things hard to test that are unlikely to fail anyway. At that scale Python is slower to build as well because c++ lets your tests depend only one the files that changed and this your code-build-test cycle is faster despite c++ being famously slow to compile.

Re: Ask HN: Why did Python win?

#736

[flagged]

You are not asking for help. The comments on your critique are patient, and explain how to look at things different. Just because people disagree, does not mean they 'attack's you. Honestly, your critiques seem more like opinions. The comments are pretty spot on that these are not issues. Your perspective on the default data types is off though. This is not an attack. I simply disagree with you descriptions and opini…

[flagged]

Re: Ask HN: Why did Python win?

#737
Great question, and one I've pondered a bit myself. Both Python and Ruby are cool languages, no doubt. But here's my two cents on why Python took off like a rocket while Ruby stayed more niche.

Versatility: Python can do anything—web dev, data analysis, machine learning, you name it. That made it a Swiss Army knife for devs and businesses alike.

Academia and Data Science: Python got super lucky with the boom in data science and AI. Libraries like NumPy, pandas, and TensorFlow sealed the deal for it in the scientific and research communities.

Readability: Python's clean syntax is a godsend for newcomers and seasoned devs alike. This led to quick adoption and a growing community. Community and Ecosystem: The Python community is massive. A bigger community usually means better support and more libraries, which feeds back into its growth.

Enterprise Adoption: Big names like Google, Instagram, and Dropbox using Python also adds credibility and draws even more people into the ecosystem. Ruby = Rails: Ruby got strongly tied to Rails. While Rails is fantastic for web dev, it kinda pigeonholed Ruby a bit.

First-mover advantages: Python's been around a bit longer, and early adoption in academic circles helped it get a head start.

Teaching Language: Python has become the go-to language for introductory computer science courses. That means a whole new generation is coming up already familiar with Python.

Ruby's awesome and it’s got its own strengths (and die-hard fans!). But Python managed to position itself as a jack-of-all-trades, and that’s helped it become the titan it is today.

Re: Ask HN: Why did Python win?

#738
Python got a reputation for being good for quick prototyping.

Python had an easy to use CLI and supportive docs that made it easy to throw things together.

Case-in-point, the language literally includes functions like:

  dir
That facilitate treating library objects as simple directories of functionality.

Default arithmetic library supports APA.

There's just a lot of stuff that's frictionless in Python, where Ruby has sprawling and unintuitive syntax, and mandatory programming constructs.

Re: Ask HN: Why did Python win?

#739
post #517

Earlier quoted context omitted.

Python was already the #2 scripting language (after perl; not counting Visual Basic) back in ~1994 when I learned it. Tcl was already dying out by then and Ruby hadn't been released. So you basically had Perl or Python. You're right that it was a "first mover" advantage but I don't think data science had a lot to do with it. Perl didn't evolve gracefully over the 1995-2005 period but Python did. I think it is probabl…

Was python really ahead of shell for scripting in 1994?

I remember it as at that time Windows and Unix was the common systems. I know we collected statistics for our business software offering that could run on multiple types of Unix and on Windows. Around 1998 I think 70% of all customers choose Windows. It was easier and cheaper.

So, I would say that the most common scripting language in the late 90s was VBScript.

I also can't recall any of the Unix gurus at our company using Python. They used bash, zsh or other shells.

Re: Ask HN: Why did Python win?

#740
post #668

Earlier quoted context omitted.

But it is absolutely unintuitive why it shouldn't be if mylist.length > 10

If the length of mylist ... see how length comes first? Only unintuitive if you never spoke English or other european languages.

A really, really bad argument in my opinion. That thinking would lead us to Cobol.
Post reply on HN