13 comments

[ 3.3 ms ] story [ 34.9 ms ] thread
I wrote a JavaScript-to-C compiler: https://github.com/jdudek/tatende-js. It supports a limited subset of the language—just enough to compile itself.

It was my university project. It’s not really useful, but it was extremely fun to work on.

Some of these are interestingly domain-specfic.

Vala is essentially sugar for the GObject API. Zephir is the same for the Zend Engine API.

Excuse me if I'm wrong, but isn't compiling to C instead of e.g. LLVM IR generally considered bad practice unless you have a very good reason due to all of C's undefined behavior?
there are certainly arguments to be made about UB (though i don't think llvm ir is free of it). on the other hand, llvm is ostensibly less portable and it's infrastructure is a rather massive beast to work with.
Why do you want to generate code with undefined behaviours ?