lua-users home
lua-l archive

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


On Wed, Apr 23, 2014 at 7:56 PM, Lukas Prokop <admin@lukas-prokop.at> wrote:
> Why shall we discuss it? Because this is non-intuitive for me:
>     > a = "hello world"
>     > inf = 1/0
>     > = a:sub(inf)
>     hello world

But it would never occur to me that +-inf is a valid integer, and I'm
probably not alone. It's simply non-defined behaviour.  To force these
odd values to have a meaning (outside their use as math.huge - an
upper bound) seems non-intuitive.