Re:“I'm basically giving myself a permanent vacation from be...
by skywhopper on Friday July 13, 2018 @01:21AM
(#17520692)
Yeesh, that’s a sad thing to burn out over. Python made this decision to avoid assignment expressions a long time ago and has done fine without this capability. Why not just leave well enough alone? Adding a new variation to assignment syntax (just because of the opinion that = vs == is too confusing (even though C and Ruby and many other languages deal with it fine)) is just going to add more confusion to the language. For a line saved here and there?
[ Parent
| on HN ]
Re:“I'm basically giving myself a permanent vacation from be...
by cben on Saturday July 14, 2018 @02:44PM
(#17531699)
I had the same gut reaction when I heard the PEP even exists.
But now I actually read the PEP, it's very well written and makes a reasonably good case that in specific scenarios it will be an improvement.
(My second gut reaction was it should have used `as NAME` postfix syntax. The PEP debunks that too. Turns out it previously proposed that and the switch to := was a major improvement :-)
The bigger question is whether the gains justify making the language larger... That's subjective, impossible to settle by debate, and the kind of thing a BDFL can help decide one way or the other :-)