Re: abstract static methods (again)



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



Relevant Pages

  • Re: Learning Java
    ... to start that way, to get used to Java, and then learn the OO stuff. ... Fact is, Java and Objective-C and C++, to name a few OOP languages, are ... procedural = all static methods ...
    (comp.lang.java.programmer)
  • Re: help with calling a static method in a private class
    ... I know Java isn't necessarily "other languages", ... static methods in Python -- they're essentially ordinary functions glued ...
    (comp.lang.python)
  • Re: abstract static methods (again)
    ... Tomas Mikula wrote: ... semantics I am going to describe. ... I'm not talking about virtual static methods. ... In fact, it is achievable with current C++ templates, only without compile time checking --- it is possible to call T::staticMethodwhere T is a template parameter. ...
    (comp.lang.java.programmer)
  • Re: What is the best way to handle standard functions used everywhere
    ... Use Static methods ... > I'm new to csharp and in other languages I used I have had a standard set of ... Create a class inherited from string and use that for my strings, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: After a few days with VS.NET 2005
    ... class procedure DoSomething; virtual; ... In neither of those languages can these static methods be virtual. ... Jim Cooper jcooper@xxxxxxxxxxxxx ...
    (borland.public.delphi.non-technical)