Static function conflicts with Non-Static?!

Dmitry Olshansky dmitry.olsh at gmail.com
Sat Jun 2 03:49:39 PDT 2012


On 02.06.2012 14:39, Kevin Cox wrote:
>
> On Jun 2, 2012 6:38 AM, "bearophile" <bearophileHUGS at lycos.com
> <mailto:bearophileHUGS at lycos.com>> wrote:
>  >
>  > Jonathan M Davis:
>  >
>  >
>  >> Personally, I wish that it weren't legal to call a static function
> with an
>  >> object and that you had to explicitly use the class,
>  >
>  >
>  > I agree.
>  >
>  > Bye,
>  > bearophile
>
> Same here, D 3.0?
>

Just rename the function. In contrast it is not easy to code up a 
workaround that will "re-enable" static as instance method back if we to 
ban it. Generic programming benefits from it in certain scenarios, while 
I personally wouldn't mind either way.

-- 
Dmitry Olshansky


More information about the Digitalmars-d-learn mailing list