Zenhack.net

Lisp And C

07 Feb 2016

This blog post is several years old at this point, but it recently came up on hacker news. The short version: Experienced C++ programmer decides C++ is too heavyweight, and the core abstractions suck, starts working on generating C with lisp macros. I’ve had this idea myself.

The idea of macros on top of a low-level language seems to have a few other independent inventors as well:

Rust has a macro system too, for that matter.

Syntactic, compile time abstraction in a low-level language still seems promising to me, but I’m somewhat skeptical of the exact approach that the author of the original post and I took. There are a few reasons for my skepticism:

I abandoned my version of this project a while ago, and it’s interesting to look back on it with a new perspective. I’m not likely to pick it up again any time soon, but if I did it would probably look a bit different. My first instinct is to make a Haskell library of combinators that generate LLVM code, or something similar.