更新时间:2023-12-05 19:29:58
有至少有几个 Qt
-Lua绑定。 Lua可以做一些你上面显示的语法;具体来说, {}
表示Lua中的表(关联数组),如果您只将匿名表传递给函数,则不需要括号:
There's at least a few Qt
-Lua bindings out there. Lua can somewhat do the syntax you've shown above; specifically, {}
indicates a table (associative array) in Lua, and if you are only passing an anonymous table to a function, you don't need parentheses:
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> function LengthOfTable(t) print(#t) end
> LengthOfTable ({"a","b","c"})
3
> LengthOfTable {"a","b","c"}
3
实际上是您的应用程序的***,当然取决于您的应用程序。无论哪种方式,Lua都很容易(IMO)嵌入到C或C ++中。
Whether Lua is actually the best for your application, depends on your application, of course. Either way, Lua is very easy (IMO) to embed in C or C++.