具有本机代码支持的编程语言,无框架(我编写框架)

发布于 2024-08-12 13:43:37 字数 228 浏览 13 评论 0原文

我正在寻找一种编程语言。它应该是一种易于学习的语言,并且应该有一个垃圾收集器。它应该是一种基本语言,具有基本类型(整数、布尔)、数组等功能,我应该编写框架。

这是我想写的游戏编辑器。编辑器的设计者将用这种编程语言编写UI的代码。该框架将是2D图形和音频框架,将来也将是3D的。

我考虑过新的 Go 语言,但它没有太多支持,也没有绑定到 OpenGL 等。

有什么想法吗?

谢谢。

I'm looking for a programming language. It should be an easy language to learn, and should have a Garbage Collector. It should be a basic language with features like basic types (integer, boolean), arrays and etc, and I should write the framework.

It is for a game editor I want to write. The editor's designer will write the code of the UI in this programming language. The framework will be a 2D graphics and audio framework, and in the future it'll be 3D too.

I thought about the new Go language, but it doesn't have much support and theres no binding to OpenGL and etc.

Any ideas?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

物价感观 2024-08-19 13:43:38

你可能想看看 Lua

Lua 是一种相对较小的语言,它只需要几个概念就可以实现功能和通用性。 整个语言的 BNF 规范可以轻松地放在一页上。它有数字、布尔值、表和函数,令人惊讶的是,这就是它需要的所有数据类型。它甚至可以以面向对象的方式工作。

有一个编译器 Luac,可以将 Lua 编译为字节码。

Lua 已经被用作游戏的 UI 编程语言。魔兽世界和其他一些游戏的插件是用 Lua 编程的。我相信 Lua 非常适合此类任务。

你想要OpenGL吗?好的... http://luagl.wikidot.com/ 是 Lua 的 OpenGL 库。

You may want to look at Lua.

Lua is a relatively tiny language which manages to be capable and universal with just a few concepts. The BNF specification for the whole language fits easily on one page. It has numbers, booleans, tables and functions, and surprisingly that's all the datatypes it needs. It can even work in an object-oriented fashion.

There's a compiler, Luac, that compiles Lua to bytecode.

Lua is already being used as a UI programming language for games. Addons for World of Warcraft and a few other games are programmed in Lua. I believe Lua is a very good fit for this kind of task.

You want OpenGL? OK... http://luagl.wikidot.com/ is an OpenGL library for Lua.

随波逐流 2024-08-19 13:43:38

因为我们不知道你想做什么,所以我不知道我们成功的机会有多大。因此,对于一种必须设置语句失败概率的语言呢:

满足 GOTO++

别说“谢谢”,这都是我的事。

Since we don't know what you want to do, I don't know what are the chances we success. Therefor, what about a language where you have to set the probability of your statement to fail :

Meet GOTO++.

Don't say "thanks you", it's on me.

此岸叶落 2024-08-19 13:43:38

享受挑战吗?

尝试 go

这是 rob pike 的技术演讲,还有一个讨论组:http://groups.google.com/group/golang-nuts/topics

Enjoy a challenge?

Try go.

Here's a tech talk by rob pike, and here is a discussion group: http://groups.google.com/group/golang-nuts/topics
.

尹雨沫 2024-08-19 13:43:38

C++ 很棒,它不是脚本语言,所以你甚至不需要脚本主机。

C++ is Great, it's not scripting lang, so you don't even need a scripting host.

Spring初心 2024-08-19 13:43:37

明显的两个是 [C](http://en.wikipedia.org/wiki/ C_(programming_language))C++。然而,[D](http://en.wikipedia.org/wiki/D_( programming_language)) 更接近 Java 和 C#,因为它在标准中具有垃圾收集器,并且还有一个比 C++ 标准库更接近 Java 的替代标准库。 D 的缺点是它们的工具不像 C++ 或 C 那么成熟,而且社区也没有那么大。

显而易见的解决方案是查看维基百科上的编译语言列表,看看你喜欢哪种的样子。

The obvious two are [C](http://en.wikipedia.org/wiki/C_(programming_language)) or C++. However, [D](http://en.wikipedia.org/wiki/D_(programming_language)) is closer to Java and C# given that it has a garbage collector in the standard, as well as an alternative standard library that is fairly closer to Java than the C++ standard library. The downside with D is that they tools are not as mature as C++ or C and the community isn't as large.

The obvious solution though it to look down the list of compiled languages on wikipedia and see which you like the look of.

把回忆走一遍 2024-08-19 13:43:37

嗯,这是一个相当广泛的问题,如果没有更具体的要求,很难给出有针对性的答案,但听起来 C(或 C++)适合您。您所描述的语言的语法均源自 C。C 将编译为本机代码。 C 是基础语言,除了基本语法之外,无需学习太多内容,并且它具有您需要的所有基本原语。

既然您已经添加了垃圾收集语言的要求,我想您可以尝试 Go,但是这种语言还不成熟,而且总是存在风险。

Well, that's a fairly broad question and without more specific requirements it is difficult to give a focused answer, but it sounds like C (or C++) would fit the bill for you. The languages you described all owe their syntax to C. C will compile to native code. C is basic language in that there is not much to learn beyond the basic syntax and it has all the basic primitives that you require.

Now that you've added the requirement of a garbage collected language, I suppose that you could try Go, but that language is not mature and there's always a risk there.

葮薆情 2024-08-19 13:43:37

如果您不想像 C 或 C++ 那样自己管理内存,可以尝试新的 Go 语言。它编译为本机代码(尽管目前仅适用于 Linux 和 MacOSX),并附带一个基本框架,可以轻松地用您自己的框架替换。

它拥有非常活跃的用户群,因此在我看来,它有可能快速成熟。

If you don't want to manage memory all by yourself like C or C++, you can try the new Go language. It compiles to native code (albeit for Linux and MacOSX only for now) and comes with a basic framework that can be easily replaced with your own framework.

It has a very active user base, so IMO it is possible to mature quickly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文