[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 7:35 AM, Marc Balmer <marc%msys.ch@localhost> wrote:
> Am 17.11.13 04:36, schrieb Lourival Vieira Neto:
>> On Sat, Nov 16, 2013 at 10:44 PM, Christos Zoulas
>> <christos%zoulas.com@localhost> wrote:
>>> On Nov 16, 9:30pm, lourival.neto%gmail.com@localhost (Lourival Vieira
>>> Neto) wrote:
>>> -- Subject: Re: [patch] changing lua_Number to int64_t
>>> | On Sat, Nov 16, 2013 at 8:52 PM, Christos Zoulas
>>> <christos%astron.com@localhost> wrote:
>>> | > In article <52872B0C.5080309%msys.ch@localhost>, Marc Balmer
>>> <marc%msys.ch@localhost> wrote:
>>> | >>Changing the number type to int64_t is certainly a good idea. Two
>>> | >>questions, however:
>>> | >
>>> | > Why not intmax_t?
>>> | My only argument is that int64_t has a well-defined width and, AFAIK,
>>> | intmax_t could vary. But I have no strong feelings about this. Do you
>>> | think intmax_t would be better?
>>> 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?
> You can always use sizeof if the need to know the size arises.
I mean know it as a script programmer. I think that would be helpful
to know the exact lua_Number width when you are writing a script.
AFAIK, you don't have sizeof functionality from Lua. So, IMHO,
lua_Number width should be fixed and documented.
Lourival Vieira Neto
Main Index |
Thread Index |