Hacker News new | ask | show | jobs
by marshray 5258 days ago
To echo chubot: Why isn't Lua more widely used?

* It lacks an easy-to-use symbolic debugger.

* It lacks a first-rate IDE.

* It lacks a standard way for people coming from OO/Java to define objects and interfaces.

* It lacks a GUI toolkit.

* It has a great set of manuals. It lacks an O'Reilly book with a woodcut animal on the cover.

* Arrays indexes start at 1.

Except for the last item, these are all relatively small things that are simply waiting for someone to come along and do them. This is a testament to the great design of the language.

And many of these things do exist, it's just the Lua style seems to be to understate the achievements to the point that folks can't tell the big new stuff from the abandoned projects.

6 comments

> * It lacks an easy-to-use symbolic debugger.

> * It lacks a first-rate IDE.

<plug>This is changing http://eclipse.org/koneki/ldt/</plug>;

> * Array indexes start at 1.

This sounds dangerously similar to "I can't use Python because it has significant whitespaces". Developers might like or dislike it, but if you can't get over _that_, you either lack important cognitive abilities, or you're suffering from a very serious case of Asperger's/OCD. I can't imagine that someone seriously hampered by _that_ could ever digest any large API.

However, I'll admit it's a bit irritating when you're frantically switching between C and Lua.

> the Lua style seems to be to understate the achievements to the point that folks can't tell the big new stuff from the abandoned projects.

You're right, organizing the efforts of the Lua "community" would probably be trickier than herding cats, and the Lua core team doesn't seem very interested in helping that happen. I sometimes suspect that even Lispers form a tighter community than Lua hackers...

> > * Array indexes start at 1.

> [...]

> However, I'll admit it's a bit irritating when you're frantically switching between C and Lua.

I would imagine it can be confusing when swapping between C and Lua, but when working in a Lua-only environment (e.g. writing addons for World of Warcraft) it very quickly becomes a non-issue.

> * It lacks an easy-to-use symbolic debugger.

> * It lacks a first-rate IDE.

>> <plug>This is changing http://eclipse.org/koneki/ldt/ </plug>;

This looks excellent, even for people who don't like Eclipse. Lua sorely lacks an interactive debugger, and your DBGp-based solution is portable beyond Eclipse.

Very nice :-)

I also think that Lua has a perception of being an embedded-only language (which it's very good at). The biggest code bases are World of Warcraft interface modifications and other plugin architectures. The features Lua would need to be really competitive as a stand-alone language (ex: good library management[1]) are still developing. I think it has the potential to be very powerful, though.

If you want to have some fun with Lua, check out LÖVE[2].

[1] http://lua-users.org/wiki/LuaModuleFunctionCritiqued [2] https://love2d.org/

Additionally, it is explicitly a batteries-not-included system. There are lots of libraries for Lua all over the net, but many people stop at "Python's standard library has hundreds of modules including the four I want. Lua's doesn't have the four I want."

Lua's goal is to be no-fat and customizable to only what you need for your unique situation. It's even common practice for systems to cut out stuff like the standard library file I/O module if it's not appropriate for your situation.

Lua's original focus as an embedded language has been a huge handicap here. There's almost no standardization, because each developer builds their own set of libraries based on their needs. It's sort of what server-side javascript looked like before node.js.

Lua is in dire need of an opinionated killer platform. Unfortunately, unfamiliarity with the language (vis-a-vis javascript) means that the road to mass adoption is a tougher one.

> Unfortunately, unfamiliarity with the language (vis-a-vis javascript)

Unfortunate especially given that Lua and JavaScript are extremely similar semantically. The difference between {} vs begin/end really does blind people to the all similarities.

It lacks a standard way for people coming from OO/Java to define objects and interfaces.

If you ask in IRC or google around you can find this pretty easily. The first result on google for query "lua class" is http://lua-users.org/wiki/SimpleLuaClasses.

> It lacks a first-rate IDE

That is an interesting claim. What are the first rate IDEs for Javascript, Python, Ruby or C++? That isn't a rhetorical question I mean vim, emacs, textmate all seem equally good for Javascript and Lua. I know people use Eclipse for Javascript but it hardly seems like a killer integration.

Something like Xcode, Codeblocks, MS Visual Studio, Eclipse, Komodo, or Python IDLE.
Ruby: RubyMine Javascript: integration in IntelliJ IDEA was always very good
There's also WebStorm which is the JavaScript/HTML/CSS specific IDE from Jetbrains.