Compliable scripting languages

Started by
5 comments, last by Bearhugger 16 years, 6 months ago
Just wondering if there are any scripting languages out there that can either be interpreted or compiled to machine code? I know of a few like python that can go from interpreter into byte code, but can’t seam to think of any that go from scripted to machine code in the form of exe or dll. Would be interested to see if such a language exists.
Advertisement
It rather depends what you mean by "scripting language"...especially if it's the somewhat common definition of "a language which can't be compiled". In any case, these days compiling a HLL to machine code is usually an inferior alternative to JIT compiling, so the latter is much more common.
Python + Psyco gives you a JIT compiler for x86. Py2exe will take you a step further, but that's not actually compiling it to machine code, it's just putting the Python interpreter and all the dependencies into one executable package.

As Sneftel says, the lack of native code compilation is one of the defining attributes of a "scripting language".
Alright well good to know. Thanks a lot
C# has a built in compiler that generates MSIL code which is then JITted into x86 code at run time, so it would make a reasonably good scripting language. It may be too flexible and powerful for average level designers. By which I mean it would be easy to write something that does nasty things to the system. It may be possible to restrict what the script can access though, I haven't really looked into it too deeply.

Skizz
It's simple to sandbox CLR code to keep it from pooping on the rest of the system. Even if you don't do that, though, you really have to go out of your way to do unsafe low-level things.
I suppose you could consider Visual Basic 6 a "compilable scripting language."

This topic is closed to new replies.

Advertisement