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
"main()" vs. "main function" #1304
Comments
Yes, the parens should go. In my opinion, "main" function should be code font: It's a bit of text that appears verbatim in user source code, and we're actually talking about the function spelled that way. (As opposed to, say, an inline function, which may or may not be declared with the |
We still have a fair amount of places where we confuse functions and function calls. I recommend deciding on a direction with @zygoloid before putting any work into this. |
@tkoeppe: I'm sorry, I don't see your point in the context of the "main" function. We might have confusion between a function and a function call somewhere (examples?), but this issue is clearly not about calls, but about the structure of the "main" function. ("main" can't be called by the user, anyway.) I'll prepare a patch to use \tcode{main} everywhere, plus a cross-reference to [basic.start.main]. These improvements should also address any questions whether, in some cases, a member function "main" might be meant (it isn't). |
Consistently use \tcode{main}. Add cross-references to [basic.start.main]. Fixes cplusplus#1304.
Consistently use \tcode{main}. Add cross-references to [basic.start.main]. Fixes #1304.
Excerpts from the standard:
In my opinion, the empty parentheses look sloppy and "
main
function" would be better.Another question is whether the "main" should be in code font. Currently there are a few instances of both "main function" (normal font) and of "
main
function" (code font).The text was updated successfully, but these errors were encountered: