views:

1423

answers:

8

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?

+1  A: 

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.

Jason Coco
That didn't really answered my question though.
I think it did: no.
David Nehme
+9  A: 

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

Brian Gianforcaro
But Brian, it is again used as an embedded scripting language. Not as a stand-alone scripting language. My question was: "Will Lua get so popular that there will soon be enough libraries to be able to use it like Python, Ruby or something similiar?"
A language has to become popular first, then come the useful libraries created by your new, excited community. As I stated in my answer, yes it will become popular I have no doubt about it, and when it does become popular the killer libraries will follow.
Brian Gianforcaro
Granted, but Ruby and Python were not designed as embedded languages; they were designed to be object scripting languages. Lua was designed for a different purpose and I think people are answering based on that.
Jason Coco
A: 

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".

Javier
+6  A: 

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.

Corbin March
+1  A: 

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.

Mecki
Note: that's Lua, not LUA. That's not an acronym...
PhiLho
Changed it from LUA to Lua :)
Mecki
A: 

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!

Jeff Sheldon
+2  A: 

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.

PhiLho
+2  A: 

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!

Sébastien RoccaSerra