Should languages require an explicit entry point (e.g. "main"), or not?
(I surprised myself by not having an opinion on this.)
(I surprised myself by not having an opinion on this.)
Most “scripting” languages don’t, and most compiled languages do, but is there a good reason for that?
It occurred to me that maybe the distinction is between langs that allow top-level expressions vs those that don't. E.g., Haskell → no top-level expr, has main().
The Swift doc even calls this out explicitly: developer.apple.com/swift/blog/
The Swift doc even calls this out explicitly: developer.apple.com/swift/blog/
See also twitter.com/vb6rox/status/…
https://twitter.com/dubroy/status/1379842576044457985 ∙ Archived on 2025-03-28.