lua-users home
lua-l archive

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


Wow, OK Patrick, people here have given you the benefit of the doubt here and humoured your arrogance but I've got to be the one to say it. Read the archives, read the wiki, and STOP making demands. It doesn't work like that here.

On 18 June 2012 11:44, Patrick Masotta <masottaus@yahoo.com> wrote:

1) I have read the archives and the reasons they give are too naive, When 0 was created human being had a hard time understanding the meaning of 0 but 0 prevailed for some reason… The same when programming there are many reasons why Programmers (even occasional ones) have to learn to use 0 based arrays..

 

2) for you the wordy sequences make the code easier to understand? How long was the longest program you ever made?

As I said before, the bracket reasons go far beyond the compiler needs…

 

3) small and clean does not have to mean “incomplete”… Switch and Continue should be there…

The funny thing is that LUA is made by “C”  coders… really hard to understand…

 

Pat

--- On Mon, 6/18/12, Arran Cudbard-Bell <a.cudbardb@freeradius.org> wrote:


From: Arran Cudbard-Bell <a.cudbardb@freeradius.org>

Subject: Re: LUA oddities..
To: "Lua mailing list" <lua-l@lists.lua.org>
Date: Monday, June 18, 2012, 2:56 AM



On 18 Jun 2012, at 11:21, Patrick Masotta wrote:

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?
 
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
 
3) Why there’s not a switch statement?
 
Best
Pat

1) I agree this is weird. It's a bit of a PITA when walking over Lua and C arrays in parallel. It's more likely one of those philosophical decisions, that has nothing to do with technical requirements - but I could and probably am wrong. I'm sure this has been discussed many times before on this list, why don't you go and search through the archives.

2) Could ask that question of Ruby and Python (-end)… Um i'm not sure where you got the 'BEGIN' from there's only end. Personally I think the makes the code easier to read. I find myself fighting with those modern IDEs that autocomplete code. Also just on principle, if the process of adding brackets can be automated to that degree, it makes their use completely redundant and they should probably be removed from the language.

3) It's redundant. The Lua language strives to be small and clean. The lack of continue is annoying, but I believe this has been solved with goto in 5.2.

-Arran