Static function conflicts with Non-Static?!

Steven Schveighoffer schveiguy at yahoo.com
Mon Jun 25 08:21:16 PDT 2012


On Sat, 02 Jun 2012 06:49:39 -0400, Dmitry Olshansky  
<dmitry.olsh at gmail.com> wrote:

> 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.
>

http://d.puremagic.com/issues/show_bug.cgi?id=6579

See revised proposal.

-Steve


More information about the Digitalmars-d-learn mailing list