News for hackers. Stuff that matters.
Re:An exploration of why Python doesn't require a 'main' fun... by crazygringo on Tuesday July 21, 2020 @04:31PM (#23910673)
Agreed.

So... why does it?

Re:An exploration of why Python doesn't require a 'main' fun... by adonovan on Tuesday July 21, 2020 @08:12PM (#23912399)
Because it's simpler. C has no concept of nested functions. If it instead allowed users to write the statements of 'main' at the top level, it would complicate the rules for scoping. For example, can an inner function access the outer function's variables? Or jump to its labels? Simpler just to say: all statements live in a function; functions don't nest; and execution starts at main.