[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.3.0 (beta) now available
- From: "Timm S. Mueller" <tmueller@...>
- Date: Thu, 23 Oct 2014 16:46:21 +0200
On Thu, 23 Oct 2014 09:13:59 -0200
Luiz Henrique de Figueiredo <firstname.lastname@example.org> wrote:
> Lua 5.3.0 (beta) is now available for testing at
> All feedback welcome. Thanks.
Not having followed discussions and development of 5.3, but I find it
counterintuitive that %f has to be used in format() where previously %d
and %x would perform the needed conversion of numbers of any type to an
integer. Similarly, luaL_checkinteger() bails out if a numerical value
is not an integer. Is there a rationale to and can someone provide
links to previous discussions of this behavior? Thanks.
My first impression was that both cases needlessly break compatibility,
in both cases the caller is fully aware of the possibility to lose
information, and the convenience of the auxlib function is forfeit. For
me as a caller it would be obvious to distinguish between checking for
a type and to receiving an integer (or representation of such) as the
closest approximation of a number.
Timm S. Mueller <email@example.com>
Schulze & Mueller GbR, Jungstr. 2, 10247 Berlin,
Gesellschafter: Franciska Schulze, Timm S. Mueller,
Tel. +49 30 85610000, http://www.schulze-mueller.de/