← Back to context

Comment by jrajav

13 years ago

Well, it automatically implies a pretty high baseline of performance and (if it's done right) unmatched portability.

"it automatically implies a pretty high baseline of performance"

I doubt that. It may be (mostly) true for languages that match the capabilities of C well, but if a language does not match C well, it certainly isn't 'automatically' because the optimizer in your C compiler will not help much in making the implementations of such features efficient.

For example, compiling JavaScript to C, it would be non-trivial to make the result as fast as the current JavaScript engines because the C code would likely have to do the same zillions 'is this a string?' checks that interpreters do (probably even more of them because it is harder to see the wood for the trees in your translated-to-C code)

For example, it would require lots of work to support, for example, Lisp's number system, Dylan's union types, any variant of 'eval', or, to take an extreme example, to map Intercal code sequences to efficient C operations such as '+'.