user32756
user32756

Reputation: 739

Has Lua a future as a general-purpose scripting language?

As already discussed in "Lua as a general-purpose scripting language?" Lua currently probably isn't the best scripting language for the desktop environment.

But what do you think about the future? Will Lua get so popular that there will soon be enough libraries to be able to use it like Python, Ruby or something similar?

Or will it simply stay in it's WoW niche and that's it?

Upvotes: 7

Views: 5185

Answers (10)

Arkt8
Arkt8

Reputation: 96

Well, greetings from 2022.

It is already a general purpose language. Today you can even serve pages using OpenResty, extend games, read databases or create scripts as shellscript replacements.

There are a plenty of libraries "modules" for Lua, many ways to achieve what you are wanting and Lua 5.4 is even faster.

The "extendable and extensive" nature of Lua, accostumed people to think it should only be used as plugin or extension. In Linux, by example, you can shebang a file with lua-any, make it executable and run like any system script. Or you can make a folder app like Python or virtualenv using Lupe. Lua 5.3 also gained impressive performance improvements.

Also there are many good tools like IUP to create native windows in Lua for Mac, BSD, Linux and Windows and side environments like Terra that lets you use Lua with its counterpart Terra and write compiled programs. Lua now, is more than a extension language, it has its own universe.

Upvotes: 0

Pushpendre
Pushpendre

Reputation: 835

It's 2017, 9 years after this question was first asked, and lua is now being heavily used in the field of machine learning due to the Torch library.

Upvotes: 2

Sébastien RoccaSerra
Sébastien RoccaSerra

Reputation: 17201

There are more and more libraries for Lua.

If you are a Windows user, have look at Lua for Windows. It comes with "batteries included" (wxLua, LuaCURL, LuaUnit, getopt, LuaXML, LPeg...).

Very usefull!

Upvotes: 2

Mecki
Mecki

Reputation: 132969

I think the great feature of Lua is, that it is very easily extensible. It is very easy to add the Lua interpreter to a program of your own (e.g. one written in C, C++ or Obj-C) and with just a few lines of code, you can give Lua access to any system resource you can think of. E.g. Lua offers no function to do xxx. Write one and make it available to Lua. But it's also possible the other way round. Write your own Lua extension in a language of your choice (one that is compilable), compile it into a native library, load the library within Lua and you can use the function.

That said, Lua might not be the best choice as a standalone crossplatform language. But Lua is a great language to add scripting support to your application in a crossplatform manner (if your app is crossplatform, the better!). I think Lua will have a future and I think you can expect that this language will constantly gain popularity in the long run.

Upvotes: 1

PhiLho
PhiLho

Reputation: 41142

Uh? I would say instead WoW is a niche in the Lua ecosystem... The world of Lua doesn't revolve around WoW, there are lot of applications, some big like Adobe Lightroom (to take a non game), using Lua.

Lua is initially a scripting language, in the initial sense, ie. made to be embedded in an application to script it. But it is also designed as an extensible language, so we will see progressively more and more bindings of various libraries for various purposes.

But you will never get an official big distribution with batteries included, like Python or Perl, because it is just not the philosophy of the authors.
Which doesn't prevent other people to make distributions including lot of features out of the box (for Windows, particularly, where it is difficult to build the softwares).

Lot of people already use it for general system-level scripting, desktop applications, and such anyway.

Upvotes: 2

Corbin March
Corbin March

Reputation: 25714

I suppose the answer starts with 'It depends how you want to use it...'.

If you're writing the common business app (fetch the data from the database, display the data in a web page or window, save the data to the database), Lua already has what you need.

The Kepler Project contains goodies for web development. Check out their modules to see some of the available libraries - there's network, MVC, DBMS access, XML, zip, WSAPI, docs...

As an example web app, check out Sputnik.

For desktop UI, there's wxLua - Lua hooks for wxWidgets.

ORM is conspicuously missing but that didn't stop people from developing in other languages before ORM was available.

If you're looking for specialized libraries - scientific, multimedia , security - don't count Lua out before you check LuaForge.

When it comes down to it, there's nothing in Lua's design that prevents general purpose use. It just happens to be small, fast, and easy to embed... so people do.

Upvotes: 6

Jeff Sheldon
Jeff Sheldon

Reputation: 2094

Warhammer Online, and World of Warcraft use it for their addon language I believe.

I think it's hot! I'm just no good at it!

Upvotes: 0

Javier
Javier

Reputation: 62593

being comfortable as a shell language has nothing to do with being a great general purpose language.

i, for one, don't use it embedded in other applications; i write my applications in Lua, and anything 'extra' is a special-purpose library, either in Lua or in C.

Also, being 'popular' isn't so important. in the Lua-users list periodically someone appears that says "Lua won't be popular unless it does X!", and the usual answer is either: "great!, write it!", or "already discussed and rejected".

Upvotes: 1

Brian Gianforcaro
Brian Gianforcaro

Reputation: 27180

I think it has a great future, a lot of projects are starting to adopt it for it's simplicity and usefulness.

Example: Awesome WM (Window Manager)

The project recently released version 3, incorporating a new configuration system completely written in Lua. Allowing you to literally write your configuration file as a program, loops, booleans, data structures. Personally I love the syntax and the flexibility of such a system, I think it has great potential.

I wouldn't be surprised if it became more popular in the future.

Brian G

Upvotes: 12

Jason Coco
Jason Coco

Reputation: 78363

I really like it as an embedded language. It's small, very easy to use and embed and mostly does what I need right out of the box. It's also similar enough to most languages that it has never really been an issue for me. I also like how easy it is to redefine and add base functions and keywords to the language to suit whatever needs my application has.

I have used it in the WoW area but I've also found it useful as a generic scripting language for a number of different applications I've worked on, including as a type of database trigger. I like Ruby and Python and other more full-featured scripting languages but they're not nearly as convenient for embedding in small applications to give users more options for customizing their environments.

Upvotes: 1

Related Questions