"bearophile" <[email protected]> wrote in message news:[email protected]... > Nick Sabalausky: >> Ie, Default initing to NaN is certainly better than >> default-initing to a commonly-used value, but it still isn't the right >> long-term solution. > > Having a nan has other purposes beside initialization values. You can > represent missing values, like C# nullable ints (that are bigger in size, > 8 bytes, I think). >
Yes, I know. I only said that "default initing to nan" was a sub-optimal approach, not having nans. But I may have misunderstood you, I thought default init values was what you were talking about? > >> So yea, either int.min, or 0x69696969 or 0xB00BB00B, etc, ie >> something that will actually stand out and scream "Hey! Double-check >> this! >> It might not be right!". > > The good thing of using int.min (and short.min, etc) is that then the > numbers become symmetric, you have a positive number for each negative > one, and abs() works in all cases. > Good point.
