[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (work1) now available
- From: Daurnimator <quae@...>
- Date: Tue, 9 Jul 2013 15:39:38 -0400
I can foresee a few problems caused by the wrap around behaviour:It is the only true change in behaviour with the introduction of integers.
As mentioned elsewhere in this thread, there are a couple of ways that floats are silently converted to integers. (e.g. iterating keys in a table)
This means that code such as:
t = { }
t [ 0.0 ] = "foo"
for k , v in pairs ( t ) do
t [ k+2^65 ] = v
end
Will completely change behaviour.
Though this is an esoteric example, I can brainstorm several manners in which this behaviour could sneak into my modules.
A 'solution' to this 'problem' is actually a bit hard to think up, I don't think wrap around is the behaviour that should happen here.
Intuition tells me a silent promotion to double might be the best choice; but this might not make sense when you're not on a 64/64 build.