lua-users home
lua-l archive

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



On 30-Aug-05, at 4:17 AM, Adrian Perez wrote:

I also think that the dangling keywords after "end" are totally unneccessary. In fact, being concise is one of the things a I love from C; typing much more than '{' and '}' is wasted time. The Lua 'do...end' is only three extra letters, which I find acceptable, but for example Pascal "begin...end" blocks have _six_ extra letters...

On the other hand, { and } are harder to type. Anyway, I think your count is selective:

int i; for (i = 1; i <= 10; ++i) { ... }
for i = 1, 10 do ... end

Advantage: Lua, 16 fewer keystrokes

if (a < 0) { ... } else if (a > 0) { ... } else { ... }
if a < 0 then ... elseif a > 0 then ... else ... end

Advantage: Lua, 3 fewer keystrokes

And in both cases, the Lua was much easier to type; far fewer uses of the shift key.

:)

R