Re: C# vs. C++ Calling the overridden base class members from derived classes.

From: Hattuari (susudata_at_setidava.kushan.aa)
Date: 03/16/04


Date: Tue, 16 Mar 2004 14:17:32 -0500

Brian Riis wrote:

> Hattuari wrote:
>
>> Not so according to Stroustrup. But more significantly, the term
>> 'method' is from computer science, and is used to describe member
>> function of a
>> class. Especially member functions invoked as part of the class's
>> interface.
>
> Agree. However C++ has a long history of giving previous OO terms new
> names, and I would say that it is generally to be more specific about
> what it is/does, or to avoid clashing with different terms. So in C++ a
> superclass is a base class, a subclass is a derived class, a method is a
> member function, and inheritance is called derivation. Jeff Alger had an
> interesting line in his book, "C++ for Real Programmers": "If you object
> to new names for old ideas, used in the interest of clarity, you're
> programming in the wrong language, buddy." The quote is his, but I
> whole-heartedly agree.
>

I have no complaint with the introduction of terms that add clarity. And I
did not argue that the term baseclass is inappropriate. I used the terms
superclass, subclass, and method as I did because I am more confident of
their meaning, and knew that the language I was using would communicate the
gist of my intent to other educated professionals. I also wanted to avoid
language specific terms because I was addressing abstract design features
common to languages where such terms as baseclass and derived class are not
used.

As for the use of the term 'method'. Stroustrup uses it in the restricted
sense of a virtual member function.

-- 
.


Relevant Pages

  • Re: Differences between "class::member" & "object.member"
    ... if the class member is qualified by static. ... when a non-static member is accessed within a non-static member function of ... Derived class, ...
    (comp.lang.cpp)
  • Re: Use of static and extern
    ... I'm not aware of any semantic difference between initialization of a const ... like a "normal" member function does. ... >the static qualifier limit scope to the file in which the definition ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Design Patterns and Functional programming
    ... it is no problem to add downward closures ... Is "useless" a language term? ... ad-hoc chimeras like Boolean | Rubbish. ... access x n Integer is a member of the class without evaluation of Pi. ...
    (comp.object)
  • Re: NIL is not of type CONS
    ... x y) and (member x y), ... same language as you might have designed. ... NIL is actually three things: a symbol, the empty list, and false. ... CL community is more "pluralistic" than the Scheme community, ...
    (comp.lang.lisp)
  • Re: "this" and "base"
    ... compiler and the programming language. ... a private inherited field in a base class from a derived class is that the ... > because the member "is a private". ...
    (microsoft.public.dotnet.languages.csharp)

Loading