lua-users home
lua-l archive

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




I’m new to LUA but I have good programming experince..

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?


I suppose it very much depends on whether you see it as an index or as an offset. In C/C++ it is clearly defined to be an offset in which case indexing from "0" is logical. If, however, you view it as an index then "1" is just as logical.

 

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

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


Seeing {} are already in use then changing is impossible. and I do seriously find it difficult to accept that people would see this as a real problem. And it's only two characters more.

I come from a different language background, erlang, and have other things about Lua to gripe about :-) but the syntax is not one of them. Nor the one based arrays.
Robert

 

3) Why there’s not a switch statement?

 

Best

Pat