lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

2017-03-12 20:16 GMT+02:00 D. Matt Placek <>:
> On Sat, Mar 11, 2017 at 9:46 PM, Daurnimator <> wrote:

> I don't think I'm alone in not being entirely happy with the ecosystem for
> native extensions.  Compared to ruby gems or something it's a much less
> consistent experience.  Regardless of what the reasons are for that, it
> certainly factors into the preference for a pure Lua implementation vs. a
> compiled extension.

Lua is designed for the following typical situation:

   1. Big complicated C program wants to provide customization:
   default setting of user options, user-supplied extra features etc,
   2. Instead of inventing a new DSL for that purpose, Lua is provided,
   preferably by including all its source code rather than relying on
   a user's own installation.

As done by e.g. Love2D (via callbacks) and LuaTeX (by allowing direct
Lua instructions).

Lua is also pretty good for little standalone utilities that extend the
experience of command-line programming. Shebang programs,

Lua is not particularly brilliant at taking over from Bash as one's main
scripting language for system applications. It is not in the running with
Ruby and Python as the final solution for those who want to do what
Perl can but just can't come to grips with Perl.

Unfortunately the Hammer Principlie makes us want to use Lua for
everything. And it sure is a Swiss Army hammer. But it's still a hammer.