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
Note that because the DefaultOption struct depends on the input, it can't be hoisted to the top level. A workaround is to move it into the function body, which basically desugars the parameter initializer, plus we can't use ternary operator because struct expression is currently not a thing:
In practise, the options could be accessed frequently, so a fixed layout will definitely benefit the performance, and avoid performance regression from polymorphism.
The text was updated successfully, but these errors were encountered:
In #38 we removed the struct expressions for grammar conflict case, however, I do believe the non-shared StructExpression would be useful:
For example it can serve as a parameter initializer:
Note that because the
DefaultOption
struct depends on theinput
, it can't be hoisted to the top level. A workaround is to move it into the function body, which basically desugars the parameter initializer, plus we can't use ternary operator because struct expression is currently not a thing:In practise, the
options
could be accessed frequently, so a fixed layout will definitely benefit the performance, and avoid performance regression from polymorphism.The text was updated successfully, but these errors were encountered: