哪些编程语言支持热代码交换和/或沙箱? [英] Which programming languages support hot code swapping and/or sandboxing?

查看:189
本文介绍了哪些编程语言支持热代码交换和/或沙箱?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个基于网络的MMO游戏,允许用户编写AI并将其作为游戏的一部分运行。我打算使用Html5的图形,并希望这是基于网络的,所以它可以从智能手机访问。我需要找到一种支持沙盒,并发,热代码交换和大型图书馆的编程语言,使事情变得更容易。



Erlang,Stackless Python和Lua。任何帮助不胜感激。

解决方案

Erlang 支持沙盒,所以你可能不想至少使用你的脚本语言。 Erlang对于脚本来说不是理想的,所以这很可能。



Erlang 为这样的项目提供良好的后台语言,但是我强烈建议您从个人经验中。 p>

我不认为Stackless有沙盒支持,所以这也可能在列表中。



Lua,on另一方面,明确支持沙盒,并且还有协同程序: http://lua-users.org/ wiki / SandBoxes http://lua-users.org/wiki/CoroutinesTutorial,所以我建议你的脚本语言。



Lua也非常容易嵌入,如在这个小教程中看到的:

I would 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).

这篇关于哪些编程语言支持热代码交换和/或沙箱?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆