You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The void type and statement vs. expression syntax right now is quite easy to trip on. Missing semicolon errors point to the next line which is most often unrelated to the issue. Both in the compiler internals and various documentation, void and void-expressions stick out as a sore thumb.
There are a number of things that need to be done to address it:
Make semicolons optional.
Automatically promote expressions to statements when and only when implied by context.
Consider removing void type from program IR. This would prevent a lot of confusion and potential void-related errors, but might require considerable code duplication (IfExpr/IfStmt, BlockExpr/BlockStmt, function calls, maybe something else?).
The text was updated successfully, but these errors were encountered:
(a.k.a. the void-sanity tracking issue)
The void type and statement vs. expression syntax right now is quite easy to trip on. Missing semicolon errors point to the next line which is most often unrelated to the issue. Both in the compiler internals and various documentation,
void
and void-expressions stick out as a sore thumb.There are a number of things that need to be done to address it:
void
type from program IR. This would prevent a lot of confusion and potential void-related errors, but might require considerable code duplication (IfExpr
/IfStmt
,BlockExpr/BlockStmt
, function calls, maybe something else?).The text was updated successfully, but these errors were encountered: