[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.3 work1 Considering math.isinteger or type()
- From: Hisham <h@...>
- Date: Thu, 18 Jul 2013 21:21:03 -0300
On 18 July 2013 14:16, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
>> 2013/7/17 Roberto Ierusalimschy <roberto@inf.puc-rio.br>
>>
>> > but I do
>> > not think the change is worth the trouble. Just imagine the endless
>> > discussions about what functions should go there...)
>> >
>>
>> I see. Maybe the discussion should not be about "what should go there", but
>> about what should not stay in debug, and move them gradually either to
>> "there" or to global. "There" would become clearer in the proccess.
>
> For me, the main problem is not debug versus "there". It is global
> versus "there". (Not to mention a lot of incompatibilities for what
> many may consider nitpicking.)
Well, my original suggestion was math.type() (and the parallel with
io.type() is indeed nice), but since we're throwing suggestions out
there, here's yet another one: if this is to be made more general than
just for math, then maybe just add the feature to type() itself, as in
type(v [, mode]) -- if given a second argument (true?) then type
returns the specific subtype, if not, the general type.
-- Hisham
http://hisham.hm/