[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [LuaJIT FFI] tonumber() and cdata
- From: Duncan Cross <duncan.cross@...>
- Date: Fri, 3 Jun 2011 00:13:11 +0100
On Thu, Jun 2, 2011 at 10:59 PM, Paul Bonser <firstname.lastname@example.org> wrote:
> I don't know, it seems like this behavior could be more helpful, like if you
> forgot to index an array to get a number out of it, silently returning nil
> isn't very helpful.
If you feel strongly about this I think starting a new thread about it
is probably the best thing, it seems kinda out-of-scope for this one.
I'm just pointing out a case specific to LuaJIT FFI that is
inconsistent to a clearly-established convention in tonumber()'s
behaviour. I actually don't have a strong opinion either way on the
wisdom of the convention itself, but I do think being consistent is
important, and it currently isn't.