float init 0 request
Walter Bright
newshound2 at digitalmars.com
Fri Aug 14 17:30:22 UTC 2026
On 8/14/2026 3:42 AM, Alexandru Ermicioi wrote:
> Nowadays java compiler seems smarter, it doesn't force you initialize it at
> declaration site, if all branches after declaration get var initialized before
> its use.
This requires Data Flow Analysis, which slows the compiler down. It's not a good
idea to have the semantics change when turning the optimizer on.
Note that when the optimizer is run on D code, any redundant NaN initialization
gets removed, so there is no penalty for default initialization. (It's called
"Dead Assignment Removal".)
More information about the Digitalmars-d
mailing list