[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (work1) now available
- From: "Joseph Manning" <manning@...>
- Date: Tue, 9 Jul 2013 16:23:25 +0100
On 2013-Jul-08 (Mon) at 09:01 (+0200), David Demelier wrote:
>> 2013/7/7 Luis Carvalho <lexcarvalho@gmail.com>:
>> >
>> > isinteger = function(x)
>> > return type(x) == "number" and not math.isfloat(x)
>> > end
>>
>> Since this is very short, I don't see any objections about integrating
>> into the Lua core instead of writing it each time :-). Also there is
>> math.isfloat() why not math.isinteger?
>>
>> Much cleaner, much convenient
Seconded!
Rather than being bloat, to me it would *enhance* the simplicity
of Lua to have this convenience and symmetry, rather than having
to remember which one of 'isfloat' / 'isinteger' comes builtin,
and which one needs to be derived.
Joseph
------------------------------------------------------------------------
Joseph Manning / Computer Science / UCC Cork Ireland / manning@cs.ucc.ie
------------------------------------------------------------------------