3 ms·
I for one predict that the new operator will appear very sparingly, in while loops and code golf competitions. There are already so many complicated semantics
by nerdponx 7y ago
I for one predict that the new operator will appear very sparingly, in while loops and code golf competitions.
There are already so many complicated semantics about mutability, iteration, bytes/strings, scoping, et al. And yet somehow a tiny piece of syntax that finally lets us stop writing "while true/break" is the big pain point?
- upofadown 7y agoExcess complexity almost always comes in small increments...
- nerdponx 7y agoFair. Fortunately with all the blowback over the walrus operator I don't think we will be seeing any new operators for a long time.
- PeterisP 7y agoI'd expect the new operator to become the idiomatic way to write certain quite common things, for example regexp group matching and objects returned by dictionary .get() - currently you always need a dummy variable to check if it's not None before you use it.