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
Statements-as-expressions allows some statements (like if/match) to be used as expressions that return a value. This could easily be done by simply converting these to expressions and using Statement.Expression, however that requires hardcoding a list of allowed expressions. There are two open questions related to this:
Figure out an effective way to distinguish which Ast/Ir classes are usable as statements/expressions without having to hardcode a list. This has been tried previously with interfaces, which seems manageable but is a little messy with Kotlin.
Figure out if/how wrapped classes (like Statement.Expression) can be removed. The current belief is that some wrapped classes like Statement.Component may be necessary for the Analyzer to handle validation; if so there may not be a compelling reason to redesign things here.
The text was updated successfully, but these errors were encountered:
Statements-as-expressions allows some statements (like
if
/match
) to be used as expressions that return a value. This could easily be done by simply converting these to expressions and usingStatement.Expression
, however that requires hardcoding a list of allowed expressions. There are two open questions related to this:Ast
/Ir
classes are usable as statements/expressions without having to hardcode a list. This has been tried previously with interfaces, which seems manageable but is a little messy with Kotlin.Statement.Expression
) can be removed. The current belief is that some wrapped classes likeStatement.Component
may be necessary for the Analyzer to handle validation; if so there may not be a compelling reason to redesign things here.The text was updated successfully, but these errors were encountered: