static class

Ary Borenszweig ary at esperanto.org.ar
Thu Feb 21 19:59:45 PST 2013


On 2/21/13 8:34 PM, Jonathan M Davis wrote:
> On Friday, February 22, 2013 00:06:26 bearophile wrote:
>> Jonathan M Davis:
>>> D doesn't
>>> bother to check, so you get the natural consequence of mixing
>>> them. I'm quite
>>> sure that the fact that it works that way is an accident. It
>>> was never
>>> intentially made to be allowed or disallowed. It's just
>>> allowed, because
>>> there's nothing intrinsic about either of the attributes which
>>> makes it
>>> illegal, and no effort was made to do prevent it (it probably
>>> didn't even occur
>>> to Walter that anyone would do it). I'd expect it to continue
>>> to work though,
>>> since it doesn't really harm anything,
>>
>> According the way my brain works, sometimes I find the D compiler
>> unnervingly sloppy.
>
> True enough, but in this case, I don't think that it's a problem.

If the compiler gave you an error if you put "static" on a top-level 
class definition, this whole thread wouldn't exist.

Don't you see that as a problem? People loosing their time answering 
this questions over and over again instead of the compiler giving you 
the answer.



More information about the Digitalmars-d-learn mailing list