Just where has this language gone wrong?
Nick Sabalausky
SeeWebsiteToContactMe at semitwist.com
Thu Jul 19 15:49:34 PDT 2012
On Fri, 20 Jul 2012 00:32:03 +0200
"David Piepgrass" <qwertie256 at gmail.com> wrote:
> > I suspect that you have a C++ background. If this is not
> > accurate, ignore the rest. But if it is accurate, my plea to
> > you is: Learn other languages. C++ has next to no innovative
> > language features (even C++11's take on lambdas is an
> > abomination) and encourages defensive programming to the point
> > where it's ridiculous (I mean, no default initialization of
> > variables? In 2012?).
>
> Actually, C# has no default initialization* of local variables,
> and I love it. Instead, it is a compile-time error to read a
> variable if the compiler cannot guarantee that you have
> initialized it. IMO this is much better than D's "let's
> initialize doubles to NaN so that something fishy will happen at
> runtime if you forget to initialize it" :)
>
> * technically the compiler asks the runtime to bitwise 0-fill
> everything, but that's just an implementation detail required for
> the .NET verifier, and the optimizer can ignore the request to
> preinitialize.
I've always wished D worked that way, too.
More information about the Digitalmars-d
mailing list