NaNs Just Don't Get No Respect

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Sat Aug 18 21:21:35 PDT 2012


On Sat, 18 Aug 2012 20:44:52 -0700
Walter Bright <newshound2 at digitalmars.com> wrote:

> On 8/18/2012 7:27 PM, Nick Sabalausky wrote:
> > Bullshit, I've used C# which does exactly what Walter is arguing
> > against, and the result never involved getting annoyed and blindly
> > tossing in an "=0".
> 
> I've seen this problem in the real world, even though you don't make
> such mistakes.
> 

I've seen lots of stupid shit in production code. I've seen a
data-loading function named "save". So which foot should we shoot off in
our fear of that real-world mistake?

And yes, yes, yes, I know AND AGREE that designing a language to help
prevent mistakes is the right things to do, but I strongly believe
you've gotten it backwards in this specific case (nothing personal, of
course). I think you're:

1. Severely overstating the problem of "blindly toss in a =0"

2. Undervaluing the benefit of C#-style static checks for
possibly-initited value usage.

After actually *using* both D (default-initialization) and C#
(statically/conservatively ensure things can't be accessed without
being explicitly inited), and I'm convinced the benefits of the static
checks easily outweigh the fear of a knee-jerk "=0".



More information about the Digitalmars-d-announce mailing list