Static attributes & immutability, static attributes seen from instances
Jonathan M Davis
jmdavisProg at gmail.com
Sat Mar 6 18:21:49 PST 2010
Lutger wrote:
> Nick Sabalausky wrote:
>
> ...
>> I've always felt that the ability to access static members through an
>> instance was just a bad idea in general, and this seems to add another
>> reason not to allow it.
>
> I agree, some compilers issue warnings in this case.
Warnings? Why allow it at all? I'm not aware of anything that you really
gain by it. It's just confusing for no extra benefit. I have no idea why any
language has ever allowed it. Sure, a warning is better than nothing, but it
really should be disallowed entirely.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list