lua-users home
lua-l archive

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


2013/2/17 Egor Skriptunoff <egor.skriptunoff@gmail.com>:

> IMHO, excessive strictness is not Lua's way of thinking.
> Convenience is the point.
> Only if the sword was a continuation of the arm could the samurai survive.
> Lua should be the continuation of programmer's thoughts in a similar manner.

True, but excessive sloppiness is also not Lua's way of thinking.

Lua allows the samurai to cut off his own limbs (sys,io=nil,nil) but not
to commit seppuku (original _ENV can be shadowed but not deleted).

Can anybody give an example from real-life code where out-of-range
indices to str:sub are significantly more convenient than keeping it strict?