Comment

Comment by pjscott

What would make this more attractive to me is a mechanism for local mutable state. Some algorithms are just easier to express if you're allowed to change the values of some local variables. Erlang has no shared mutable state, but as Haskell's State monad shows, it's perfectly possible (and often useful) to keep mutable state boxed off safely.

Since this can be transformed to tail-recursion, you should be able to implement it on the Erlang VM without too much trouble. Getting a convenient syntax and doing the transformation would be the hardest part.

parent pjscott 16 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton