floating point - nan initializers

Jarrett Billingsley kb3ctd2 at yahoo.com
Sat Feb 18 20:37:59 PST 2006


"Dave" <Dave_member at pathlink.com> wrote in message 
news:dt8o24$djh$1 at digitaldaemon.com...
> I'm with you, but would like to see these init'd to 0, primarily for 
> consistency (but the OP was really about arithmetic types anyhow). Also, 
> what's with D re-reinventing the wheel here - C# and Java both init these 
> to 0, as they do with *all* native types (again easy to remember 
> consistency).

They used to be, but Walter changed it when Arcane Jill (i.e. the founder of 
Unicodism, a rabid religion whose platform is that of strict acceptance and 
compliance of Unicode) said that it should be 0xFF, which is the "nan" 
equivalent for Unicode characters - that is, 0xFF means "not a valid 
character."  Of course, this still leaves out integral types, for which 
there is no nan equivalent.

One thing that all three types can represent, however, is 0 :) 





More information about the Digitalmars-d mailing list