News for hackers. Stuff that matters.
Re:The History, Controversy, and Evolution of the Goto State... by int_19h on Monday November 19, 2018 @04:31AM (#18485121)
This example is a case for languages where the bodies of conditionals, loops etc are required to have a terminator. Python is technically one of them, but probably not the best one, because terminator is the DEDENT pseudo-token, and because it's just whitespace, it can be easy to miss.

The best examples are languages like Lua and Ruby, where you have to write it as if .. then .. end or if .. then .. else .. end. Alternatively, in the curly brace family, it's the ones that make braces mandatory in this situation, like Go - if ... { ... }.

Re:The History, Controversy, and Evolution of the Goto State... by goto11 on Monday November 19, 2018 @06:57AM (#18485778)
Agree, and I am paranoid enough to always use braces for single statement bodies. I also think this is recognized as a flaw in C-style syntax, and newer languages like Rust mandate the braces.

I do think Python has the simplest and most logical solution though.