zzzzrrr
Joined: 17 Feb 2007 Posts: 139 Location: Washington, DC
|
Posted: Fri Mar 13, 2009 9:18 pm Post subject: My two cents |
|
|
People, when you're working with computationally intensive code, I would STRONGLY suggest you statically initialize all of your floats to zero. In particular, you probably want remember to do this when porting code from other languages to D.
Today, one particular bug drove me nuts for many, many hours.... Unexpected NaN values were crashing Blaze, and it all basically came down to a single uninitialized float. Keep it simple (KISS), and initialize to zero at declaration. It's too easy to forget or overlook something when dealing with thousands of lines of complex code...
Another rookie mistake, probably yes, but be rest assured that I will not make this error again.... Ah, you have to love statically typed languages! |
|