3 ms·
> Currently shell code is limited to one language. If you have bash, you can only do bash. But we could imagine a shell that understands webassembly, and hence
by naniwaduni 8y ago
> Currently shell code is limited to one language. If you have bash, you can only do bash. But we could imagine a shell that understands webassembly, and hence we can use it with many languages. We could even imagine tools to inline webassembly generation, so that you can code directly in your favorite language in the shell, and it gets transparently compiled and executed.
We might even compile directly to native code, nay, automatically identify the format and pass it to the appropriate interpreter, and then provide an interface to call arbitrary modules that conform to a particular interface―
... and then expose it as a library function so the shell can use it, let's call it execve().
- Camto 8y agoSince so many languages use # for comments, we could even have a special comment that finds the interpreter for you! If only we had something like that.