lua-users home
lua-l archive

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


On Tue, Jan 14, 2014 at 4:41 AM,  <colinz@gmx.com> wrote:

Only, I am a bit confused by
> all those modules and libraries out there. Especially by the fact that there
> is no official library or collection of libraries.

No so. The standard libraries are documented in the Reference Manual.
See <http://www.lua.org/manual/5.2/manual.html#6>.

On why there are so many modules and libraries out there, see
<http://lua-users.org/wiki/ZenOfLua>, then
<http://www.luafaq.org/#T1.11>.

Lua is written in the intersection of C89 and C++ so it can be used to
embed in C and C++ programs as an extension scripting language. By,
inter alia, keeping the Lua "core" small as possible running in a
multi-platform VM while still providing what's needed to extend Lua,
you get extremely fast execution speed and a tiny footprint, extended
by only the libraries and modules actually needed for the particular
application. You also gain a language that is sparse enough that is
relatively easier to learn.

That said, there is some order in what might seem at first blush to be
chaos. If you want to have a collection of libraries and modules close
at hand, check out LuaDist[1] and LuaRocks[2].

For the widest assortment of modules and libraries, you're better off
at present to use Lua 5.1. Lua 5.2 is relatively new and many modules
and libraries have not yet been upgraded to be v. 5.2 compatible,[3]
although doing so is a large community effort.

> Also, Lua uses some unintuitive punctuation marks as operators (e.g. .. for
> string concatenation), which impair radability (at least from a newbie's
> perspective).

See "Why have a special operator for string concatenation?"[4]

I really liked more BASIC syntax because everything tends to
> be intuitive.

No. It is intuitive because you have already mastered it. There is far
more to learning a programming language than learning its syntax,
which is actually trivial when compared to learning what possibilities
the language and its interpreter have to offer and what programming
aids and resources are available.

In my opinion, it would be a huge mistake to try to adapt Lua syntax
to be more like Basic. That's only one step away from thinking in
Basic and thereby blinding yourself to anything different that Lua has
to offer, which is a very lot. Lua is not like Basic, else there would
be no need for Lua. Not to be rude, but I suggest that you either dive
into Lua or go back to the Basic swimming pool.

Best regards,

Paul

____

[1] http://luadist.org/

[2] http://www.luarocks.org/

[3] http://www.lua.org/manual/5.2/manual.html#8 (incompatibilities)

[4] http://www.luafaq.org/#T1.11

-- 
[Notice not included in the above original message:  The U.S. National
Security Agency neither confirms nor denies that it intercepted this
message.]