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
Instead of making throw an expression, maybe it would make more sense to allow statements on the right-hand side of variable and keyword declarations? This is already allowed for assignables, so this would just make the two more consistent, which seems like a smaller change (given all the assignments currently are of the form <Expression e>;, this also wouldn't require changing any existing code). This would mean that there would be more cases where something is given on the right that doesn't make sense, but, again, we already handle this for assignables.
@mahills that would also be a good solution, and for single expression function declarations as well. While we haven't integrated expressions and statements yet, it seems like the best thing to do.
Having to write this is awkward:
if we promote the throw statement to expression level:
The text was updated successfully, but these errors were encountered: