Can call static method with null reference

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Mon Jun 24 10:13:45 PDT 2013


On Sunday, 23 June 2013 at 10:09:39 UTC, Jonathan M Davis wrote:
>> Also I don't know why I should call static methods from an
>> instance. What's the purpose?
>
> It's stupid and pointless as far as I can tell, but I believe 
> that C++, Java,
> C#, and D all do it, so as stupid as it is, it's a common 
> stupidity

Java prevents it, I'm pretty sure C# picked that up from Java. 
(Unless Java has changed since 1.5)


More information about the Digitalmars-d-learn mailing list