On 20/07/2012 00:49, Nick Sabalausky wrote:
On Fri, 20 Jul 2012 00:32:03 +0200
"David Piepgrass" <qwertie...@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.
vote++