←back to thread

2024 points randlet | 1 comments | | HN request time: 4.446s | source
Show context
js2 ◴[] No.17516019[source]
Background ("PEP 572 and decision-making in Python"):

https://lwn.net/Articles/757713/

replies(2): >>17516132 #>>17516693 #
bluecalm ◴[] No.17516693[source]
Well, when he is dealing with arguments as silly as "but we will confuse = with ==) it's not a surprise he is tired and had enough. I just wish he had pushed through C style assignment before retiring. New syntax is ugly and introduces a new operator which basically does the same thing. When I've seen this PEP for the first time I thought he lost his touch after so many fantastic design decisions throughout the years. Now I realize he just had enough.

Thanks Guido for fantastic language. I wouldn't find love for programming if it wasn't for you.

replies(3): >>17516852 #>>17517193 #>>17518184 #
sevensor ◴[] No.17518184[source]
My reaction was the opposite -- I didn't know about PEP572, read it immediately after this retirement announcement. My response was, "where has this feature been all these years?" I'm delighted by the addition -- it removes a lot of "loop and a half" ugliness without adding do loops, it simplifies list comprehensions, it lets you remove opportunities to make mistakes, and it doesn't let you put a single-equals assignment inside a conditional as a typo.
replies(1): >>17519038 #
sneakermoney ◴[] No.17519038[source]
Same here, I often find myself writing a loop-and-a-half and will on occasion repeat expressions to get around extra lines (if I cared about performance, I wouldn't be writing it in Python).

I feel like a lot of the resistance is from people who think this is somehow bad style, because it's associated with a source of bugs in other languages. The same kind of people will argue endlessly against having 'goto' in a language, even when it can clearly make for cleaner code (eat it, Dijkstra!) in some cases.

replies(2): >>17520460 #>>17522652 #
1. sevensor ◴[] No.17522652[source]
I think EWD was basically in the right to push hard for structured programming, but I also like Knuth's nuanced take:

https://pic.plover.com/knuth-GOTO.pdf