lua-users home
lua-l archive

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

On Mon, Jun 18, 2012 at 02:21:57AM -0700, Patrick Masotta wrote:
> I’m new to LUA but I have good programming experince..

Lua is not an acronym :)

> 1) I couldn’t believe when I saw LUA arrays indexed from “1”; that’s for kids not for programmers. 
> LUA is developed in C, there’s a lot of effort going on integrating LUA with C/C++ then why this?

Because they're indexes, not offsets from a base pointer.

> 2) Why you guys do not use {} instead of the wordy BEGIN END sequences???

Readability for non-programmers.  Anybody with a half-decent text editor
will notice no difference in terms of effort to type.

> No matter that modern IDE’s auto-completion save us the extra work punching more characters, The real problem is when we have to read LUA code instead; The bloated text makes harder to understand the code lay-out

Hardly.  The structure/indentation of your code has no relation to what
is used to communicate to the parser that structure.  Look at Python for
example, which doesn't have any.

> 3) Why there’s not a switch statement?

Because there's a more powerful alternative: tables with functions in