Sign in to follow this  
MrRage

Compliable scripting languages

Recommended Posts

MrRage    127
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.

Share this post


Link to post
Share on other sites
Sneftel    1788
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.

Share this post


Link to post
Share on other sites
drakostar    224
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".

Share this post


Link to post
Share on other sites
Skizz    794
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

Share this post


Link to post
Share on other sites
Sneftel    1788
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this