top | item 46355278

(no title)

netcraft | 2 months ago

I think the reason python won was that it was easy to learn and read and was batteries included. vs perl: People need to solve their problems, not fight with syntax

Theres a lot of network effects as well. The more people were using it, the more people will use it.

discuss

order

zahlman|2 months ago

Python was batteries included, in the standard library, in an era where putting those kinds of things in the standard library made sense.

Now there's tons of stuff they're deathly afraid of removing, that they would never remotely consider adding if it weren't already there. (If you don't believe me, have a flip through proposals on discuss.python.org for new additions. People think of Python as a language that's constantly adding and changing stuff and inadvertently causing breakage as a result, but it's actually very conservative relative to the volume of proposals.)

kamaal|2 months ago

>>I think the reason python won was that it was easy to learn and read and was batteries included.

This is also a big reason why AI assisted programming will wholesale replace Python programmers.

If your are optimising for people who wish to remain at beginner levels all life, and that replaced people using power tools to solve harder and bigger problems. It shouldn't be surprising that now some automation will replace you.

fud101|2 months ago

Perl had the batteries and it had CPAN. Python borrowed the best bits of Perl and enjoyed a reputation which overlooked its many flaws. If it had been scrutinized as much as Perl, we'd have realized it was just as bad but in different ways.

theamk|2 months ago

This makes no sense.. Python _was_ heavily scrutinized when it was introduced - the whole "Perl vs Python" comparison was pretty popular for a while, with either of those being declared winner, depending on the author.

If there is really a killer argument for Perl over Python that was overlooked in all those years, why don't you say that argument, or even better, write a blog post explaining why Perl is better than Python? Then we could discuss that instead of nebulous "different ways"/

madduci|2 months ago

I don't believe the "syntax win" scenario. Python is also ugly, due to the required indentation, like yaml.

I believe more in the ecosystem, specifically how the computer vision and machine learning movements have adopted python extensively as frontend language (the heavy weightlifting is still doing in C++). The exploit of numpy has brought many many use cases into the language as well.

loloquwowndueo|2 months ago

Indentation is there regardless, and is increasingly enforced by format-checking tooling which is more commonly an out-of-the-box offering for many ecosystems (gofmt).

So why not make it have syntactical meaning since it’s already there in 99% of cases?

It does feel weird at first but honestly it’s not something you’ll think about much after a while.

Joker_vD|2 months ago

> don't believe the "syntax win" scenario. Python is also ugly, due to the required indentation, like yaml.

That's like, your opinion. Python was explicitly designed being easy to learn, borrowing heavily from ABC, which actually experimented with different syntaxes to see what works and what doesn't. The indentations apparently helps a lot with this, along with ':' before the introduction of indented blocks.

evgen|2 months ago

That 'ugly' required indentation and whitespace also made Python easier to read, especially for newbies and casual coders. A standard visual structure and a syntax that is pretty close to executable pseudo-code lowered the barrier to entry for a lot of people and made Python feel 'approachable'. This perception that it was easy to use helped increase the network effects other have noted.

gbalduzzi|2 months ago

It's not about being beautiful or ugly, it's about being simple.

Python is simple to read / write and easier to reason about, especially for people that need a programming language to solve a problem but are not software engineers.

The reason it won, especially in data analysis, is because most data analyst are/were not software engineer and Python feels more natural to people.

The indentation is not a big problem when a decent text editor is used

randallsquared|2 months ago

> Python is also ugly, due to the required indentation, like yaml.

The fact that YAML also won in its configuration file niche doesn't give you pause?

f33d5173|2 months ago

> Python is also ugly, due to the required indentation

As opposed to the not required indentation that literally everyone who writes code ever does anyways?

> believe more in the ecosystem, specifically how the computer vision and machine learning movements have adopted python extensively

What came first, the chicken or the egg?

juujian|2 months ago

I was not exposed to much code before trying Python 2, and I always thought of the indentation and newlines as aesthetically pleasing and helpful. Same for yaml actually. Would argue that preferences on indentation etc. are just an acquired case.

markus_zhang|2 months ago

Even for someone who has used more than one languages, I think Python is fine. It’s a lot prettier than the academic-HN preferred lispy languages.

kemayo|2 months ago

"Ugly" is a very opinionated statement there. I personally find it's fine, and Python's required-indentation matches what I'd be doing anyway. It's no different to me than a project which lints indentation via something like gofmt.

suriya-ganesh|2 months ago

required indendation simplified a ton of readability problem with other languages for a regular user.

There was no easy for people who wanted to get something done in a simple interface.

dpark|2 months ago

I think the controversy around Python’s indentation helped it gain success. Regardless of how you feel about the choice, it’s a great opportunity for bike shedding and encouraged (and still encourages) a lot of talk about the language.

zahlman|2 months ago

There are all sorts of other arguments people make, but it's frankly incomprehensible to me that some people find indentation-based block syntax "ugly" and the alternatives not so. I must wonder if this extends as far as not indenting code in braced languages.