3 ms·
Shen does something unusual in deployment. Their idea is to write a smallish number of intrinsics and data structures in your main language, and then import the
by JonChesterfield 3y ago
Shen does something unusual in deployment. Their idea is to write a smallish number of intrinsics and data structures in your main language, and then import the shen interpreter on that. This gives you code written in shen, callable from the host language.
This is interesting for sharing code across multi-language projects, e.g. as a JavaScript library and a Java one, where the shen interpreter gets written once per language and now all your library code is callable from any of them.
I think it's a minor misfire that this is an interpreter, as opposed to a compiler from shen to whatever language, but that would be fixable. I'd rather compile the shared definitions to raw c++ code ahead of time than run an interpreter.
Aside from that, the definition is mostly in shen (modulo said primitives) so it has an axiomatic angle to it, and the type checker is a prolog. Compiler and prolog engine both available to user code of course.