-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Name of application entry point #2265
Name of application entry point #2265
Conversation
7c6c6b2
to
7b0b82d
Compare
I'm assuming you're wanting proposal review? It looks like this didn't get the labels for it (not sure why, the branch is named like it came from the script), so I've added them. |
Looks good to me, but remember to update the PR description to match the abstract. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me.
One argument in favor of "Run" that I think is worth mentioning is that it follows the common advice to give functions names that are verb phrases rather than noun phrases. Following established conventions seems likely to be more important and better aligned with our goals, but we should present the strongest argument available for the alternatives we decide against.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One argument in favor of "Run" that I think is worth mentioning is that it follows the common advice to give functions names that are verb phrases rather than noun phrases. Following established conventions seems likely to be more important and better aligned with our goals, but we should present the strongest argument available for the alternatives we decide against.
To be clear: I'd like Run
to be explicitly listed in the "Alternatives considered", because it is an alternative that we explicitly considered and had some specific motivation for. I've added a suggested edit to capture this alternative.
…f the entry point.
@chandlerc has asked for more discussion on this as part of the broader question of how we approach the default / main package. |
FYI, #1869 was recently resolved in favor of naming the entry function |
Make the preamble of simple programs more ergonomic, by removing the `package Main` from the main package and removing the `package` declaration entirely from the main source file. Imports within a single package no longer need to, and are not permitted to, specify the package name. Partially covers #2001 / #1136. Covers #1869. Supersedes #2265. Addresses design idea #2323. --------- Co-authored-by: Jon Ross-Perkins <[email protected]> Co-authored-by: josh11b <[email protected]>
This proposal presents a bit of background information on entry point names from
other languages and draws the conclusion that Carbon should adopt
Main
as itsentry point name from the little objective information and trends that can be
deduced.
Fixes #2004.