tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [patch] changing lua_Number to int64_t



On Sun, Nov 17, 2013 at 12:58 PM, Christos Zoulas 
<christos%zoulas.com@localhost> wrote:
> On Nov 17,  1:36am, lourival.neto%gmail.com@localhost (Lourival Vieira Neto) 
> wrote:
> -- Subject: Re: [patch] changing lua_Number to int64_t
>
> | > Bigger is better. And you can use %jd to print which is a big win.
> |
> | I agree that bigger is better and %jd is much better then "%" PRI/SCN.
> | But don't you think that to know the exact width is even better?
>
> Why? You can always compute it at runtime if you need to.

Yes, but I think that it is not a common practice in Lua. AFAIK, Lua
has only math.huge [1] to tell what is the biggest number value
available (what isn't the same of having the lua_Number width). Thus,
we would need to provide an interface to return this information. I'd
prefer to have it defined in compile time independently of platform.
Anyway, as I stated before, I have no strong feelings about that.. if
everybody else prefer intmax_t, I have no objection.

[1] http://www.lua.org/manual/5.1/manual.html#pdf-math.huge

Regards,
-- 
Lourival Vieira Neto


Home | Main Index | Thread Index | Old Index