Just where has this language gone wrong?
Jacob Carlborg
doob at me.com
Thu Jul 19 23:40:17 PDT 2012
On 2012-07-20 00:32, David Piepgrass wrote:
> 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" :)
Floats and doubles initialized to NaN can be really annoying when
interfacing to C or porting to D from another language.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list