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
This isn't ideal as it creates an anonymous function which is immediately invoked, which makes the code harder to read and adds the overhead of allocating a function, calling it, then deallocating it. It would be nice to not have to do this.
Perhaps Louis has a particular alternative in mind, but we could generate something like:
let_block;{letb=1;_block=b+1;}a=_block;returna;
(Or in this case assign directly to a instead of _block, but I'm not sure the compiler would be able to do that)
The text was updated successfully, but these errors were encountered:
Currently, this gleam code:
Compiles to this javascript:
This isn't ideal as it creates an anonymous function which is immediately invoked, which makes the code harder to read and adds the overhead of allocating a function, calling it, then deallocating it. It would be nice to not have to do this.
Perhaps Louis has a particular alternative in mind, but we could generate something like:
(Or in this case assign directly to
a
instead of_block
, but I'm not sure the compiler would be able to do that)The text was updated successfully, but these errors were encountered: