Re: abstract static methods (again)
- From: Tomas Mikula <tomas.mikula@xxxxxxxxx>
- Date: Mon, 19 Oct 2009 02:51:29 +0000 (UTC)
On Sun, 18 Oct 2009 19:19:55 -0700, Peter Duniho wrote:
Tomas Mikula wrote:
I have searched this group for "abstract static methods" and found a
couple of threads, but I think none of them was discussing the kind of
semantics I am going to describe. As you might have guessed, I believe
it would be useful :). [...]
You aren't the first. However, in C++, C#, Java, and languages like
them, you simply are never going to have methods that are both virtual
and static. And since abstract implies virtual, that rules out abstract
static methods too.
I'm not talking about virtual static methods. In this case, abstract
would not imply virtual. My second use case could most probably be
accomplished in C++ by Concepts (though Concepts didn't make it to C+
+0x). In fact, it is achievable with current C++ templates, only without
compile time checking --- it is possible to call T::staticMethod() where
T is a template parameter.
.
- Follow-Ups:
- Re: abstract static methods (again)
- From: Daniel Pitts
- Re: abstract static methods (again)
- From: Peter Duniho
- Re: abstract static methods (again)
- References:
- abstract static methods (again)
- From: Tomas Mikula
- Re: abstract static methods (again)
- From: Peter Duniho
- abstract static methods (again)
- Prev by Date: Re: abstract static methods (again)
- Next by Date: Re: abstract static methods (again)
- Previous by thread: Re: abstract static methods (again)
- Next by thread: Re: abstract static methods (again)
- Index(es):
Relevant Pages
|