Hacker News new | ask | show | jobs
by AlexMax 2165 days ago
Sorry, but I think this is a poisonous, thought-terminating cliche.

Python has had multiple ways of doing many things for a very long time, and the longer you program in any language, the more you realize there are often many solutions to a problem and the "best" approach either depends on context or you realize there is no one "best" approach and go on preference.

I think the idea should be judged on its own merits without having to consult the Zen. That said, I seriously don't see the point of it. Python 3 already forced everybody to convert all their print statements to look like function calls, and now GVR wants to bring the old style back as an option? It's just parenthesis, what's the point?

If he wants to put that new parser to work, how about taking another look at multi-line lambdas?

2 comments

The key words are ‘preferably’ and ‘obvious’ (although that way may not be obvious at first unless you're Dutch). It's fine if there are merely multiple ways to do something, as long as you're not actually giving people tough choices.
> Python has had multiple ways of doing many things for a very long time ... the more you realise there are often many solutions to a problem

But "solution" and "ways of doing things" from a language perspective are different. You can one way of doing something in a language, yet provide different implementations of the same solution. The difference is how different a "way" is at some level of abstract (vs "syntactic sugar).

Inventing new sentences is needed everyday, inventing new words much rarely so. "programmable program languages" or those highly dependant on custom frameworks fall prey to this: where code becomes a personal space that is hard to break into. You have to "terminate-thought" at some level, if else everyone "creatively" reinvents the low level (e.g. built-ins) then no collaboration is practical; accept the standard building block, and implement your solution with those.

> there is no one "best" approach

but there are "better" approaches