Closed gasche closed 2 years ago
Thanks - and good points!
I agree that (if <mutate> then (-) else (+)) e1 e2
would be simpler.
My immediate reaction was to think "but that will then allocate a closure" - which it probably won't precisely because of the "lets-do-right-to-left-eval-to-save-closure-alloc" ZINC-trick! 😄 I'm wondering whether there would be any performance difference between the two though 🤔
Your implicit suggestions for
dont_mutate
attribute andlet () = e in
" mutation
were also well received!
Note: I think that a simpler translation of
e1 + e2
, which would avoid issues with evaluation order as well, would be