Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"

Walter Bright via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu May 29 10:09:48 PDT 2014


On 5/29/2014 7:28 AM, Jesse Phillips wrote:
> The language docs state, "If the Initializer is void, however, the variable is
> not initialized." Which I suspect is false in the case of module scope and as
> Steven pointed out, other times doing special "don't init" is costly.

The language does not guarantee it is initialized. That doesn't mean it has no 
value, however. It means its initial value must not be relied upon.

While the current implementations puts them in BSS which is set to 0 before 
program start, it doesn't have to be done that way. Embedded systems that don't 
have loaders, for example, may map it onto RAM and that RAM may have whatever 
garbage in them that appeared when power was applied.


More information about the Digitalmars-d-announce mailing list