No main() Error
Ron Tarrant
rontarrant at gmail.com
Wed Feb 5 08:39:41 UTC 2025
On Tuesday, 4 February 2025 at 22:14:40 UTC, Paul Backus wrote:
> It sounds like what you are really asking for here is a better
> error message when the compiler encounters a statement outside
> of a function.
>
> E.g., if the compiler sees a control-flow keyword like
> `foreach` or `if` at the top-level scope of a module, instead
> of saying "declaration expected", it could say something like
> "`foreach` statement is not allowed outside of a function."
>
> I agree that this would be a worthwhile improvement.
Yes, well put. And thanks for the support.
More information about the dip.ideas
mailing list