static vs non-static

Jonathan M Davis jmdavisProg at gmx.com
Sun Jan 13 14:42:41 PST 2013


On Sunday, January 13, 2013 17:39:21 bearophile wrote:
> Maxim Fomin:
> > dmd allows to call static functions on instance.
> 
> I think that's a D design mistake (and I think Jonathan Davis
> agrees with me), but Walter prefers the current behavour.

C++ and Java (and probably C# too) have this problem as well, so it's not 
really any surprise that D does it, and I wouldn't expect Walter to change his 
mind on it (especially since it risks breaking code for something that he 
would probably consider fairly minor). I do think that it's a design mistake 
(in all of these languages), but I wouldn't expect it to change.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list