4 ms·
As a long-time Python user, this is one of the worst proposals I've seen. Yes, it has a potential for being useful. But its usefulness, unlike context manager
by Daishiman 9y ago
As a long-time Python user, this is one of the worst proposals I've seen.
Yes, it has a potential for being useful.
But its usefulness, unlike context managers and async, is very limited, implied a substantial cognitive overhead by introducing a new operator, and has a very significant potential for abuse.
One of the nice things about Python is that it is highly succing while disallowing the sort of expressions that are too information-dense to be easily understood, which has been a critique of mine in other languages of similar use cases (Clojure, Haskell, I'm looking at you).
Succinctness is good if it allows expressing ideas in a way that maximize comprehensibility and go straight to the point.
But truth is, nobody's missing out on serious functionality by not being able to do an assignment on the same line of code as a conditional. It can be very slightly annoying, possibly. But I look at the examples and I'm really not convinced that this feature is so orthogonal and useful as to merit inclusion.
It feels like accepted PEPs are slowly coming under less scrutiny and disregarding the idea of feature orthogonality and low overhead.
- lozenge 9y agoIt isn't an accepted PEP, just a draft.
- fnulnu 9y agoWhilst I personally prefer succinct code, the proposal looks to be unpythonic. Why is this any better than ‘—i’? Arguably the same thing could be said for list & map comprehension.
- buvanshak 9y ago>It feels like accepted PEPs are slowly coming under less scrutiny and disregarding the idea of feature orthogonality and low overhead. I have been noticing this long before. For me it was with the pep that dealt with automatic string interpolation, i think it was 498..