lua-users home
lua-l archive

Re: Lua 5.1 (work6) now available

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


Gavin Wraith wrote:
In message <d010fc8a05051907081d63f5a6@mail.gmail.com> you wrote:
I for one think the length operator is a good thing.
The frequency of use justifies the syntactic simplification.
I agree, and my vote would be for # rather than *. There is an
aesthetic rationale for my choice. # looks like two overlaid +
signs and length is additive. * makes me think of multiplication,
not appropriate at all.
I am a newbie here, so forgive my impertinence. But lua has typically chosen keywords for readability (do end vs do { }). I have used lots of programming languages, but I have never used one where a length operator was done with a symbolic primitive. Doesn't "t:len()" or even table.len(t) seem like better syntax? And what does this primitive return anyway, the real length of the table or what luaL_getn() returns?
--
chris marrin ,"",ドル
cmarrin@arch.sel.sony.com b` $ ,,.
(408) 955-3049 mP b' , 1$'
Sony ,.` ,b` ,` :$$'
 ,|` mP ,` ,mm
 ,b" b" ,` ,mm m$$ ,m ,`P$$
 m$` ,b` .` ,mm ,'|$P ,|"1$` ,b$P ,` :1ドル
 b$` ,$: :,`` |$$ ,` $$` ,|` ,$,,ドル`"$$ .` :$|
b$| _m$`,:` :1ドル ,` ,$Pm|` ` :$,ドル..;"' |$:
P$b, _;b$$b1ドル" |$$ ,` ,$$" ``' $$
 ```"```'" `"` `""` ""` ,P`
"As a general rule,don't solve puzzles that open portals to Hell"'

AltStyle によって変換されたページ (->オリジナル) /