The other languages that work with the BEAM are all roughly equivalent. I failed to be explicit, but as weatherlight indicated, languages like Ruby will never work on it.
But your argument is “supporting any language”. Lunatic isn’t supporting any language, the language has to be compatible with WebAssembly for all the reasons you and weatherlight stated.
Erlang/Elixir+BEAM is a tightly integrated ecosystem where the sensibilities of the language(s) and the sensibilities of the runtime mesh perfectly. Both language and runtime are highly opinionated, and their opinions are identical.
WASM is the opposite of opinionated. It was designed to be a compilation target for everything. Almost every language is working on supporting WASM, and that's exactly what WASM was intended for. Because Lunatic is built around WASM, it does support any language, because that's what WASM set out to do.
On the contrary, wasm is extremely opinionated for an assembly-level language. I mean, starting with the part where it literally doesn't have goto, and "almost every language" like C++, C#, or really anything else that has such a construct on language level has to rewrite it into (sometimes much less efficient) loops, conditionals, and/or duplicated code. Or we could talk about how code and data are strictly separated in memory, so no JIT and no language features that require it.
You’re correct, and it’s entirely possible that a language that targets WebAssembly must be designed in a way that makes this a useful addition to the ecosystem.
I just get skeptical when people try to retrofit an existing language/platform to act like FP in general, or Erlang in particular.