[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: string.sub for suffix not usable with varying length (including zero)
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sun, 17 Feb 2013 09:30:27 +0200
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?