开发者

Which programming languages support hot code swapping and/or sandboxing?

I wou开发者_JS百科ld like to write a web based MMO game that will allow users to write AI and run it as part of the game. I plan to use Html5 for graphics and want this to be web based so it can be accessed from smartphones. I need to find a programming language that will support sandboxing, concurrency, hot code swapping, and a large library to make things easier.

At this time my research is turning up Erlang, Stackless Python, and Lua. Any help is appreciated.


Erlang does not support sandboxing, so you probably don't want to use that, at least for your scripting language. Erlang isn't ideal for scripting anyway, so that's probably ok.

Erlang would make a good backend language for a project like this, however, and I'd highly recommend it from personal experience.

I don't think Stackless has sandboxing support either, so that's probably also off the list.

Lua, on the other hand, explicitly supports sandboxing, and has coroutines, too: http://lua-users.org/wiki/SandBoxes, http://lua-users.org/wiki/CoroutinesTutorial, so I would recommend that for your scripting language.

Lua is also extremely easy to embed as seen in this tiny tutorial: http://heavycoder.com/tutorials/lua_embed.php (and you can even get away without all the library loading stuff since you'll want to be sandboxing it anyway).


I'd also go with Lua due to it's absurd customizability and versality (if you don't like it's syntax you can change it to a functional or a python-like one). As said in the previous answer, you've got sandboxing and strong concurrency. I personally would never even think of embedding anything else than Lua ;>.

However, Lua lacks a expanded standard library, and this is where Python wins big time :/.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜