Re:ShenScript – An Implementation of the Shen Language for J...
by aidenn0 on Saturday January 02, 2021 @11:58AM
(#25614143)
I dunt know about Shen, but I looked into doing a wasm implementation of common lisp, and wasm is far too static. You can't, e.g. compile a single function to wasm and then call it from your already existing wasm. On top of that, its stack implementation makes it hard to do GC and any nonlocal transfers if control that aren't anticipated by its C++ support.
[ Parent
| on HN ]
Re:ShenScript – An Implementation of the Shen Language for J...
by sitkack on Sunday January 03, 2021 @07:05AM
(#25621297)
Trampolines can enable all you seek.
Re:ShenScript – An Implementation of the Shen Language for J...
by aidenn0 on Sunday January 03, 2021 @08:37PM
(#25627094)
Can you explain more? Trampolines can help with non-local returns, but at a significant cost to performance in the case where returns are all local. I don't see how they help with allowing you to arbitrarily (re)define functions, which is something that both Javascript and real world assembly languages allow just fine, but WASM struggles with.