[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua minus null (-0)
- From: David Kastrup <dak@...>
- Date: Thu, 09 Jun 2011 11:15:00 +0200
Dirk Laurie <dpl@sun.ac.za> 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