Lua 作为通用脚本语言? [英] Lua as a general-purpose scripting language?

查看:30
本文介绍了Lua 作为通用脚本语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我看到 Lua 时,我唯一读到的就是非常适合嵌入"、快速"、轻量级",而且比其他任何东西都更常见:魔兽世界"或简称WoW".

When I see Lua, the only thing I ever read is "great for embedding", "fast", "lightweight" and more often than anything else: "World of Warcraft" or in short "WoW".

为什么仅限于将整个内容嵌入到另一个应用程序中?为什么不像使用 Python 或 Perl 那样编写通用脚本?

Why is it limited to embedding the whole thing into another application? Why not write general-purpose scripts like you do with Python or Perl?

Lua 似乎在速度和内存使用(最快的脚本语言 afaik)等方面做得很好,那么为什么我从来没有看到 Lua 被用作桌面脚本语言"来自动执行任务?例如:

Lua seems to be doing great in aspects like speed and memory-usage (The fastest scripting language afaik) so why is it that I never see Lua being used as a "Desktop scripting-language" to automate tasks? For example:

  • 重命名一堆文件
  • 从网上下载一些文件
  • 网页抓取

是缺少标准库吗?

推荐答案

仅仅因为它作为嵌入式脚本引擎的专用语言被销售"(在某些一般意义上),并不意味着它仅限于.事实上,魔兽世界也可能选择 Python 作为他们的嵌入式脚本语言.

Just because it is "marketed" (in some general sense) as a special-purpose language for embedded script engines, does not mean that it is limited to that. In fact, WoW could probably just as well have chosen Python as their embedded scripting language.

这篇关于Lua 作为通用脚本语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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