static this sucks, we should deprecate it
Robert Fraser
fraserofthenight at gmail.com
Thu May 28 21:42:50 PDT 2009
Walter Bright wrote:
> Ary Borenszweig wrote:
>> The thing is, I've been using Java for more than 7 years now and I
>> never got any error because of intialization dependency. It would be
>> nice to turn that check off in D and see the results. Maybe no one
>> will complain about it.
>
> Eliminating implementation-defined behavior like that makes a language
> more reliable and portable. Java's failure to address this is a hole in
> their system.
It's not implementation-defined. When a class is loaded (the times at
which it is are specified), static members are initialized and static
blocks run in the order that they appear in the source file.
More information about the Digitalmars-d
mailing list