←back to thread

317 points est | 5 comments | | HN request time: 0.001s | source
Show context
amelius ◴[] No.17448876[source]
If they add anything to Python, it should be the ability to do functional-style programming without hassle. Right now it's almost impossible to compose functions in an inline style such as used in functional programming languages. Yes, there's lambda, but it doesn't extend into multiple lines, and applying a function to a bunch of lambdas directly leads to line-width overflow. Even JavaScript has better support for functional-style programming. Perhaps Guido should spend a year writing Haskell :)
replies(8): >>17448904 #>>17448927 #>>17448972 #>>17449048 #>>17449482 #>>17450517 #>>17450691 #>>17451251 #
1. olavk ◴[] No.17450691[source]
There are plenty of very good functional programming languages. If you prefer Haskell to Python, just go ahead and use Haskell. Python has a very specific design philosophy which is a focus of readability and the "preferably only one obvious way of doing it".
replies(2): >>17451177 #>>17456119 #
2. amelius ◴[] No.17451177[source]
It's not easy to "just" switch languages. You also have to consider the ecosystem built around them. For example, I love NumPy and SciPy.

> preferably only one obvious way of doing it

I don't think that is true at all. Python allows you to perform many tricks, with overloading operators etc.

replies(1): >>17451439 #
3. olavk ◴[] No.17451439[source]
You should probably look into the JVM or .net platforms, where the same libraries are available through multiple languages. For example .net have F# which is a very strong functional language, and the JVM have Scala and Clojure.

Pyhton is not really that kind of language.

4. zorkw4rg ◴[] No.17456119[source]
How a language with nested list and dict comprehensions can ever claim to focus on readability is beyond me, or look at typing and the mess that leaves behind. One obvious way of doing things while simultaneously mixing oop and functions arbitrarily in their standard library even providing camelCase and snake_case aliases(!) for parts of it. And why does the base64/b64encode return bytes and hashlib/hexdigest str?

Python is designed in such a strangly arbitrarily inconsistent, hypocritical and opinionated manner.

replies(1): >>17456878 #
5. toyg ◴[] No.17456878[source]
> even providing camelCase and snake_case aliases(!)

Sorry, but it's preposterous to bring up an implementation detail of the standard library that has long been in the process of being fixed. CamelCase was deprecated a long time ago in favour of snake_case; what is left of CC is for backward-compatibility and will eventually disappear. This is all documented.

The standard library is not the language, it's much messier and suffers from all sorts of issues that have nothing to do with the language itself.