On 07/19/2012 09:35 PM, Damian wrote:
On Thursday, 19 July 2012 at 22:32:04 UTC, 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" :)

It would be great if D did do this, surely it would not be all
that difficult! and wouldn't it also help in finding unused variables?

Walter doesn't like it. Past discussions:

http://forum.dlang.org/post/gon06s$1nbe$1...@digitalmars.com
http://forum.dlang.org/post/ha37cf$4l2$1...@digitalmars.com
http://forum.dlang.org/post/i4mlee$5a2$1...@digitalmars.com

Reply via email to