Definitely interested in the Elm runtime and use of trampolines for tail-call elimination. Good article. I've not looked into the wasm spec yet but when thinking about how to implement a language like Elm that presumes the presence of a (albeit small) vm, my old FORTH experiences quickly comes to mind. Your closure implementation fits into the concept of FORTH's word dictionary quite nicely. Combine this with an Actor-style concurrency model and it seems like something that could target wasm (and even other platforms) quite nicely - details & devils notwithstanding.
Definitely interested in the Elm runtime and use of trampolines for tail-call elimination. Good article. I've not looked into the wasm spec yet but when thinking about how to implement a language like Elm that presumes the presence of a (albeit small) vm, my old FORTH experiences quickly comes to mind. Your closure implementation fits into the concept of FORTH's word dictionary quite nicely. Combine this with an Actor-style concurrency model and it seems like something that could target wasm (and even other platforms) quite nicely - details & devils notwithstanding.
Thanks Ben!