tech-userlevel archive

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

Re: Lua in-kernel (lbuf library)



On Wed, Oct 16, 2013 at 2:18 PM, Mouse <mouse%rodents-montreal.org@localhost> 
wrote:
>>> [...0-origin vs 1-origin arrays...]
>(...)
>> You propose Lua as a language embedded into C rather than separate
>> one.  I'd say that Lua designers made wrong decision here.
>
> Only if you think of Lua as being designed for embedding in C.  It's
> just as coherent to think of the mistake as being trying to wed a
> language with 1-origin arrays with a language with 0-origin arrays.

I don't think it is a bad design. You just has to use a different
abstraction set when using the embedded language. If you are planning
to use the extension language with the same mindset you use with the
system language, then you are more susceptible to make bad designing
decisions (IMHO). Lua tables don't intend to bind C arrays at all. If
you want to use C arrays, I think, you should use C arrays (not
something else).

-- 
Lourival Vieira Neto


Home | Main Index | Thread Index | Old Index