What changes would have to be made to JavaScript to make it compilable. I don’t mean to make into executable that still relies on interpreter – I mean so that it compiles into binary in the way that C compiles.
I expect the prototypal inheritance might be an issue – but I don’t know.
Also, I am pretty sure that eval would not be possible (or desired).
Is there anything out there that is trying to do something like this?
Is it technically achievable?
Could JavaScript (with some small modifications) be used as to create efficient programs?
EDIT
I am specifically looking for something like what RPython is to Python – but for javascript.
It also appears that dynamic typing would be difficult/impossible for a compiled language as I want.
I don’t think there’s any issue with the prototypal inheritance. Indeed,
evalmight not work unless there was some sort of JS-VM that would compile it on the fly.As for what it would need to be actually useful, I would rate the ability to call functions from C/C++ libraries as most important. Without that, you wouldn’t be able to do anything useful.