DMD 1.017 release

Walter Bright newshound1 at digitalmars.com
Tue Jun 26 12:58:29 PDT 2007


Stewart Gordon wrote:
> "Walter Bright" <newshound1 at digitalmars.com> wrote in message 
> news:f5rmna$3101$1 at digitalmars.com...
>> A corresponding 2.001 should be out soon.
>>
>> http://www.digitalmars.com/d/1.0/changelog.html
> 
> "The .init property for a variable is now based on its type, not its 
> initializer."
> 
> Why?

Suppose:

	int f = random();

in other words, let's say the initializer was a runtime computation that 
changes every time it is computed. This causes problems because then:

	assert(f == f.init)

fails.




More information about the Digitalmars-d-announce mailing list