[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: String-to-number coercion
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sun, 15 Sep 2013 21:26:23 -0300
> 2013/9/10 Andrew Starks <email@example.com>:
> > In my very humble opinion (and despite my own transgressions into
> > discussions on its redesign :), it gets this balance perfectly... Except
> > when it prompts strings to numbers. .)
> More precisely: the exact spot where this irks me is that if you set
> metamethods for str:__add etc, they don't get invoked when tonumber()
> succeeds for both operands, EVEN WHEN BOTH ARE STRINGS.
Wthat do you mean, exactly? Can you please give an example?