lua-users home
lua-l archive

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


Do you think C has to adatp to LUA? don't you think the other way arround should be a smarter approach?
 
>Sometimes they are the Client, and the Client may not want ...

Do you really think today’s LUA target are the mining engineers that do not want to learn a 0 based array??? or probably the game industry 90% based on C/C++ solutions???

 
>Personally, it seems a bit silly to worry about 0-based indexing. You
>can't judge the sophistication of a language by the fact that it does
>not resemble some 'real programming language'.
 
Don't get me wrong I love LUA as far as I can integrate it with C/C++ and the 1 based arrays makes things harder and generate errors mostly when used with LuaJIT...
 


--- On Mon, 6/18/12, steve donovan <steve.j.donovan@gmail.com> wrote:

From: steve donovan <steve.j.donovan@gmail.com>
Subject: Re: LUA oddities..
To: "Lua mailing list" <lua-l@lists.lua.org>
Date: Monday, June 18, 2012, 2:57 AM

On Mon, Jun 18, 2012 at 11:49 AM, Patrick Masotta <masottaus@yahoo.com> wrote:
> I do not understand your answer when I can see a lot of energy focused on
> integrating LUA with C/C++ back and forth.

As before, /LUA/Lua/g

It is very common for Lua and C/C++ to be integrated, but they remain
very different languages. A good external API will present arrays as
1-based.  After all, they are not _offsets_ (as in C), they are
indices, and it's common in mathematics to index arrays from 1, which
is how we count anyway.

> I'm an Electrical Engineer and I strongly disagree with your point of view
> of an engineer having problems understanding 0 based arrays…

I should have explicitly excluded Electrical Engineers ;)  We're
talking about Mining and Civil Engineers here, different animals.
Sometimes they are the Client, and the Client may not want to be
educated further, especially if he/she is a very busy person.

Personally, it seems a bit silly to worry about 0-based indexing. You
can't judge the sophistication of a language by the fact that it does
not resemble some 'real programming language'.

steve d.