[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: What would you remove from Lua - a case of regression?
- From: Muh Muhten <muh.muhten@...>
- Date: Sun, 25 Nov 2018 19:20:40 -0500
On 11/25/18, Philippe Verdy <email@example.com> wrote:
> Note: math.floor() is not required toi return a native binary integer. It
> may return a variant type using integers for some ranges, and doubles
> outside the range. So even in this case the the inference would not help
> eliminate the necessary tests on the effective type of the variant... The
math.floor can return literally anything. It can be redefined.
In the case where it _isn't_, this is pointless pedantry since it's
not unreasonable to expect the compiler to be aware of (idioms
involving) the stdlib. (And vice versa.)
> Note that the ompiler must still be correct semantically (notably for
> handling exceptions/errors and pcall() correctly).
Pray tell, what does this entail under the pretext of _changing the
semantics_ to make things easier for the compiler?