[OT] Sharp Regrets: Top 10 Worst C# Features

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Thu Aug 20 09:56:15 PDT 2015


On Thursday, 20 August 2015 at 16:44:44 UTC, H. S. Teoh wrote:
> On Thu, Aug 20, 2015 at 04:22:20PM +0000, Jonathan M Davis via 
> Digitalmars-d wrote: [...]
>> I really don't mind NaN. It really doesn't cause problems 
>> normally. The problem with floating point values is floating 
>> point values themselves.  They're so painfully inexact. Even 
>> without NaN, you can't use == with them and expect it to work. 
>> Compared to that, how NaN is dealt with is a total non-issue. 
>> Floating points themselves just plain suck. They're sometimes 
>> necessary, but they suck.
> [...]
>
> But how would you work around the inherent inexactness? In 
> spite of all its warts, IEEE floating point is at least a 
> usable compromise between not having any representation for 
> reals at all, and having exact reals that are impractically 
> slow in real-world applications.

I don't know that there _is_ a good solution, and IEEE floating 
point may realistically be as good as it gets given the various 
pros and cons, but they're still annoying and IMHO really 
shouldn't be used unless you actually need them.

- Jonathan M Davis


More information about the Digitalmars-d mailing list