ModularM
Modular2y ago
8 replies
Alex Gunnarson

Lisp (or other languages) on top of Mojo?

I (and many others) derive considerable benefit from using a Lisp-based language: homoiconicity, macro capability, regularity of syntax, terseness, developer convenience (e.g. Paredit, Parinfer), and so on. Plus, even beyond issues of practicality — as anyone knows who's "gotten" Lisp — there's something subjectively beautiful and timeless about it (https://xkcd.com/224/).

I'd like to suggest that Mojo have some facility for other programming languages to take advantage of the compiler work being done under the hood. JS has source maps for transpiled languages like TypeScript, ClojureScript, etc. The JVM processes bytecode emitted by hosted languages and treats such languages as first-class citizens. Having some sort of transpilation story (or possibly better, a hook-in to the Mojo MLIR representation?) could be a powerful advantage for Mojo as it draws in indirectly users like me who are disconnected from the Python ecosystem, but who still want to take advantage of Mojo's performance and reach to heterogeneous architectures.

This, of course, is all assuming that Mojo is defining some custom MLIR passes that give it some sort of technical advantage over a language that used MLIR directly. Otherwise there's not much to do here 🙂
Was this page helpful?