Closed ghost closed 4 years ago
Oak translates to C, and then makes its own binaries. There are plans to make an LLVM or x86 backend, but thats a ways away.
@adam-mcdaniel
But in README you said that this is an alernative to C.
It is an alternative to C. It serves the same purpose C does: low level systems programming. In addition to compiling to C, it can compile to Golang and TypeScript (and in turn JavaScript). It may use C as one of the backends, but that doesn't mean it can't compete with C. Early versions of C++ compiled to C, too :)
By translate, I assume you mean compile down to the 17 different instructions listed in the README, and assemble to C equivalents.
Also, the "more portable than C" feature comes from the fact that the backend is extremely abstract. How many different atomic operations need to be added to implement a target for GCC for a CPU? It's certainly more that 17 instructions.
Ok, I understood
@adam-mcdaniel Does Oak translates to C or Oak makes it’s own binaries?