Re: Infinity as index
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Infinity as index
- From: steve donovan <steve.j.donovan@...>
- Date: 2014年4月24日 17:18:43 +0200
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.