Why can't static functions be virtual
James Dennett
jdennett at acm.org
Wed Jan 17 08:04:40 PST 2007
John McAuley wrote:
> Sorry guys for not actually *listening* to your replies.
>
> I inherited someone else's thread by replying to an old post.
>
> The gist of his question was: why is it not *currently possible* to have virtual statics?
>
> I got a lot of informative and factual responses. Thanks guys.
>
> Of course, I was going off on one, imagining how easy it would be to implement virtual statics. So I didn't listen properly to the responses.
>
> But moving on, I'd like to change the question to:
>
> Do you think that it would be possible to implement virtual statics in D?
Quite possible, given one of many possible specifications;
the difficulty is in making such a specification useful
rather than brittle and confusing. The difficulties with
the concept of virtual statics *are* conceptual, not
implementation issues.
If D has one advantage over C++, it is in its relative
simplicity. Bogging it down with this kind of conceptual
murkiness won't help it as a language, IMO.
-- James
More information about the Digitalmars-d
mailing list