Re:*JS : Low-Level JavaScript
by stcredzero on Saturday May 12, 2012 @09:53PM
(#3965765)
I'm a bit confused by the "it compiles to JavaScript" part. I would've expected it to compile to C.
[ Parent
| on HN ]
Think of it more like C (really more like a hybrid of C and JS) compiling to JS. It runs on the web, but it compiles to a very stylized kind of JS: it allocates a large typed array that represents a C-like heap and does its memory access on that typed array. This is the same basic approach that Emscripten uses for running C/C++ programs.
The purpose of this project is to experiment with a dialect of JS that integrates well with regular JS, so you can write performance-sensitive parts of your application in this dialect, and they can interoperate smoothly with the other parts of your normal JS code.