Re:Pyre: Fast Type Checking for Python
by philwelch on Friday May 11, 2018 @05:02PM
(#17050788)
So has the Python community collectively abandoned "there's only one way to do it"?
[ Parent
| on HN ]
Re:Pyre: Fast Type Checking for Python
by joshuamorton on Friday May 11, 2018 @05:51PM
(#17051021)
I find it funny that everyone misremebers this. The zen states that there should be one, and preferably only one, obvious way to do it. Not only one way to do it, but one obvious way, and if you have one obvious way you probably don't need more than one.
There's always been more than one way to do things. String formatting, loops/map-filter/comprehensions., Even importing.
The idea is that for whatever you're doing, the language should provide an obvious way to accomplish that. Sometimes that means having competing ways of doing it, so that distinct but similar problems both have obvious solutions.
> I find it funny that everyone misremebers this.
Probably because the Zen is also right about most people not being Dutch.
That (and Zen of Python in general) was always intended to be primarily about the development of the language itself and it's core libraries. Of course it carried over a fair bit, but I don't think it was ever really a thing enough to say that the community abandoned it.
The zen is a target, but python fails to reach it very often. After all, duck typing is implicit, there are many way to format and the logging library is very much nesting.
We are not monks, we live in the real world.