5 ms·
It's worth pointing out that Python is 30ish years old at this point. It's "outstanding features" were creating a syntax that a lot of people can quickly grok
by doix 4y ago
It's worth pointing out that Python is 30ish years old at this point.
It's "outstanding features" were creating a syntax that a lot of people can quickly grok (not just programmers) and the way they allowed for extensions to be written in C.
I believe it also popularized the concept of "there should be one obvious way of doing things", in stark contrast with Perl; "there's more than one way to skin a cat".
It's easy to look at this now and say that it's nothing interesting, because it already pushed the boundaries.
- tcmb 4y ago> I believe it also popularized the concept of "there should be one obvious way of doing things" It's one of the principles from the Zen of Python: https://en.wikipedia.org/wiki/Zen_of_Python#Principles https://en.wikipedia.org/wiki/Zen_of_Python#Principles I agree with your comment, all of these taken together were a medium-sized revolution at the time. It's not for nothing that Python is the most popular language for teaching programming nowadays.
- philippejara 4y agoI'm not sure they did to be honest. If I had to choose something to attribute the success of python to the general non-programmers i'd say jupyter notebooks are an order of magnitude more important than any of those things mentioned. Especially when the idea of there being one obvious way of doing things is contradicted in probably the most used package of pandas, and even built in things like list comprehensions vs loops vs itertools, then couple that with the way it does variable passing. Can't really agree that it is easier to read for laymen than other c-like languages of its day either, with the use of underscores for class methods and indentation defining scope. Honestly if I wanted to really know why python was successful interviews with the authors of the notebook, pandas and the AI libraries would be my targets, cause in my view they're the ones that made the language a success.
- bmitc 4y ago> If I had to choose something to attribute the success of python to the general non-programmers i'd say jupyter notebooks are an order of magnitude more important than any of those things mentioned. Even then, Elixir notebooks with Livebook and F# notebooks with .NET Interactive (which are actually polyglot notebooks with several languages that can share data) are ahead of plain old Python notebooks.
- imiric 4y agoThe Zen of Python is not much more than a meme. As a nearby comment pointed out, Python doesn't follow it in many ways (explicit vs. implicit comes to mind), and it contradicts itself in several places. "Readability counts" might be the one exception, at least early on in the language's lifetime. Nowadays it could be argued that even that is diminishing. But readability is often overlooked by most programming languages, which is a mistake. Programmers (should) spend more time reading than writing code, so it's very important. It's also very difficult to get right, being so subjective, but GvR has a good eye for it, and he made good design choices to balance it with expressiveness. Readability is also crucial for a language being welcoming to newcomers, and new programmers in general. I think that Python is still the best first language for people learning to program. This is likely the biggest reason for its adoption and popularity today.
- roflyear 4y agopracticality beats purity
- bmitc 4y agoPython doesn't really even follow that maxim itself. Also, even at the time of Python's creation, it ignored the influence of more disciplined languages (i.e., MLs, Smalltalks, Lisps, Schemes) and refused to adopt such influence over its lifetime. Guido van Rossum famously stated that `functools` is where he put things he didn't (doesn't) care about. I don't think that even now he understands functional-first programming. All that being said, Python's age is irrelevant when discussing the future of programming.
- lhuser123 4y ago> creating a syntax that a lot of people can quickly grok (not just programmers) This. We tend to underestimate what it takes to create something easy to use.
- valcron1000 4y agoHaskell is also a 30 year old language and I think it has a lot more to say about the future of programming than Python
- roflyear 4y agoWhat is that?
- valcron1000 4y agoFrom the top of my head: - First class functions (pretty much all languages) - First class null values through Option/Maybe (several languages use nullable types like Typescript but it's an approximation to the real thing) - Unit type instead of hacks like 'void' (Kotlin, Rust) - Expressions over statements (ex. if..then..else is an expression, and you don't rely on hacks like ternary expressions) (Kotlin, Rust, Scala) - Statically typed with full type inference (Kotlin, Rust, Scala) - Pattern matching (Java and C# are continuously extending this feature) - Green threads as default (Go, soon Java) - Decouple data from interfaces through Type Classes/Traits (Rust, C#'s static virtual members in interfaces is a start) - Generic programming. Do not confuse this with parametric polymorphism (I think Rust has an approximation through macros) - Effects (like IO) as first class values (Scala's ecosystem tries to mimic this) Haskell was released in 1990 and feels more modern than most "modern" languages.