(no title)
FakeComments | 6 years ago
What makes if statements and loop statements more useful than goto statements?
Switch is a powerful abstraction over chained and/or nested if statements, in much the same way other constructs are abstractions over goto.
A programming language is for humans to read — and switch statements greatly enhance comprehension.
While other languages use := for assignment, and perhaps there’s arguments that’s better in the face of typos, Python doesn’t in general — and I don’t see the utility in adding a second way to do assignment.
The use cases of the walrus operator are useful, but they’re just cases of assignment in many languages; a second sometimes used assignment operator is not.
No comments yet.