lua-users home
lua-l archive

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

Dirk Laurie <> writes:

> On Thu, Jun 09, 2011 at 08:54:18AM +0200, David Kastrup wrote:
>> Lua does not have an integral type, and the given rationale for that is
>> that it does not need it since the integral subset of floating point
>> numbers works just as well.


>> Since it is actually near to impossible to differentiate between 0 and -0
>> programmatically except by the rather expensive act of inverting them
>> (unlike inf and -inf, 0 and -0 are equivalent for value comparison
>> purposes and indexing) or stringifying them, one really wonders what good
>> it is to have them print differently.  
> Maybe _because_ it's hard to distinguish them otherwise? :-)
> Anyway, this is a question to ask of the people who define
> the behaviour of C formatting.

C has a separate integer type.

David Kastrup