News for hackers. Stuff that matters.
Re:An exploration of why Python doesn't require a 'main' fun... by nailer on Wednesday July 22, 2020 @05:41AM (#23915385)
> the function "boilerplate" serves to hint to the user that the things in the function body happen at runtime to distinguish from the other things which tend to happen at compile time

'hinting' seems vague. Programmers who know what they're doing know that calling functions happens at run time. Obviously you can call a function without needing a wrapper function or a wrapper class + method.

Re:An exploration of why Python doesn't require a 'main' fun... by throwaway894345 on Wednesday July 22, 2020 @01:56PM (#23919712)
To be clear, we’re debating the merits of a special syntax that allows the syntactic intermingling of executable code and static declarations. While experienced programmers can probably sift through this and identify which things are static and which are dynamic, not all programmers are experienced (note that the original claim was that the intermingled syntax is better for beginners) and further even experienced programmers may appreciate the explicit syntactic distinction between static and dynamic. Lastly, it also makes it easier to write static analysis tooling (linters, type checkers, compilers, etc) since the intermingled syntax is more complex to implement.

It’s fine if you don’t agree with the value judgments—for example, if you would rather save a handful of characters in “hello world” at the expense of some clarity or technical simplicity. I’m just giving the rationale.

Re:An exploration of why Python doesn't require a 'main' fun... by nailer on Thursday July 23, 2020 @06:01AM (#23925750)
> not all programmers are experienced

You are arguing against `print('hello world')` working.

Re:An exploration of why Python doesn't require a 'main' fun... by throwaway894345 on Friday July 24, 2020 @09:48AM (#23939421)
Right, I’m not worried about optimizing the language for “hello world” at the expense of real code.