So, my after-work project these days is a language that transpiles to C++ and can do all that current C++ can do.
The grammar is completely regular, and the syntax maps 1:1 with the ast in memory, I can generate one from the other idempotently.
The main reason I am doing this is that I wanted a language that is easy to build tooling for (including of course code transformations) while being compatible with existing C++ libraries out there.
This kind of articles give me hope there might actually be demand for my crazy thing once it grows up.
I read that paper a long time ago and it was certainly an inspiration :)
Originally, the language started out quite different but I can now see why SPECS looks the way it does, I do not agree with everything they did and my effort these days is towards making it simpler and smaller but there's some convergent evolution indeed.
So basically a CoffeeScript for C++? That sounds like a pretty good idea in fact. But doesn't "compatible with C++ libraries" imply compatible with .h files, and thus with the preprocessor?
Dealing with the preprocessor is a lost cause, so I just don't, the idea at the moment is to let the preprocessor do its thing and pipe the output into ctags (and if a better ctags comes out in the future it will be trivial to put that in instead), the result is not 100% perfect but is good enough to capture most of the declarations present in the included headers and make them visible to this language.
If a library absolutely requires preprocessor macros to be useable, someone will have to make equivalent hygienic macros in this language but at least you won't have to make a huge wrapper for everything.
The grammar is completely regular, and the syntax maps 1:1 with the ast in memory, I can generate one from the other idempotently.
The main reason I am doing this is that I wanted a language that is easy to build tooling for (including of course code transformations) while being compatible with existing C++ libraries out there.
This kind of articles give me hope there might actually be demand for my crazy thing once it grows up.