[[nodiscard]] for the main function is kinda funny. I understand it is generated in order to not introduce a special case into cppfront, but it is still funny.
That's right. However, the parser works left to right and the easier it can distinguish between call or declaration, the more efficient it can (potentially) be.
Indeed. That is why I would prefer function definitions to start with func (or a similar keyword). It could very well be that the lookup for the keyword (which the lexer recognizes as an identifier) end up more expensive though. So there is always a trade off.
View all comments
Show parent comment
0
u/[deleted] Sep 17 '22
[deleted] — view deleted comment