Fundamental question about visibility

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • WW

    #31
    Re: Fundamental question about visibility

    jeffc wrote:[color=blue]
    > "Gavin Deane" <deane_gavin@ho tmail.com> wrote in message
    > news:6d8002d0.0 309250324.4205c b1@posting.goog le.com...[color=green]
    >>
    >> How do you know how many other people also had an objection to the
    >> use
    >> of 'method' but elected not to mention it after WW had already
    >> brought
    >> it up?[/color]
    >
    > I'd argue with all the pedants. Anyone who wastes a post telling
    > someone else that "method is not part of the C++ standard language!
    > nyah nyah!" has a stick way too far up their rear.[/color]

    Stop trolling!

    --
    WW aka Attila


    Comment

    • WW

      #32
      Re: Fundamental question about visibility

      jeffc wrote:[color=blue]
      > "Gavin Deane" <deane_gavin@ho tmail.com> wrote in message
      > news:6d8002d0.0 309250324.4205c b1@posting.goog le.com...[color=green]
      >> And how does the exchange between the OP and WW which ended with the
      >> OP's problem solved lead you to conclude that WW wasn't helping?[/color]
      >
      > The part about the method was completely unhelpful. He was just
      > saying it to show off his book knowledge of detail unrelated to the[/color]

      Stop trolling!

      --
      WW aka Attila


      Comment

      • WW

        #33
        Re: Fundamental question about visibility

        jeffc wrote:[color=blue]
        > "WW" <wolof@freemail .hu> wrote in message
        > news:bktoi1$591 $1@phys-news1.kolumbus. fi...[color=green]
        >>
        >> Method has no definition in a C++ discussion. It can only cause
        >> imprecision, confusion and misunderstandin g.[/color]
        >
        > Yeah, right.[/color]

        Stop trolling!

        --
        WW aka Attila


        Comment

        • WW

          #34
          Re: Fundamental question about visibility

          Noah Roberts wrote:
          [SNIP][color=blue][color=green]
          >> Please, if you *know* what method means in the realm of the C++
          >> language... by all means, post it here!
          >>[/color]
          >
          > Methods are actions you may request that an object carry out. You
          > invoke 'methods' by passing 'messages'; methods are implementations of
          > messages. This is basic OO terminology that you learn in any
          > introductory text.[/color]

          That is the meaning of method in OO. What is the meaning of method in C++?
          [color=blue]
          > The problem with C++ is that when you pass a message to an object it
          > is not necissarily the one that carries out the action even if it
          > has overridden its parent's methods. This is only guaranteed if
          > the method is declaired virtual in *all* parents.[/color]

          That is one interesting issue. The other is that in C++ freestanding
          functions (due to ADL and operator overloading) may very well be considered
          part of a class types interface.
          [color=blue]
          > I suppose this is why some people would consider only
          > virtual 'functions' to be methods and why
          > others would object to a "member function" being called a method at
          > all.[/color]

          And this is already a source for confusion.
          [color=blue]
          > This is also one of the reasons I find C++ does not quite
          > apply the OO paradigm (which can be a strength at times).[/color]

          C++ is multiparadigm.
          [color=blue]
          > There is also the fact that all C++ "member functions" eventually get
          > altered to in fact be functions that accept class structs as
          > arguments. I myself don't believe this should have an impact on our
          > terminology as it is an implementation detail that the programmer
          > never really sees.[/color]

          Unless he starts to do tricks, like calling a member directly from C or
          assembly. I saw that being done in an allegedly portable system. :-) "Why?
          The this pointer is the first argument, everybody knows!" Nice parallel to
          stating that method has a well defined meaning in C++.

          [color=blue]
          > In other OO languages the term method is used and they also get
          > altered by the compiler to have a more function like signature.[/color]

          That is OK. They did include the term method into their vocabulary and
          defined its meaning. It is not done for C++.
          [color=blue]
          > For example Objective-C works this way (many even just preprocess
          > into C) but we use OO terms not procedural terms.[/color]

          Does nto have much to do with why it is wrong in C++. For example in
          English fast is an OK word. The same word in Hungarian means "the private
          parts of a man". So does that mean we should bad the word from English?
          Nope. Does that mean we should not use it in Hungarian? Only if you don't
          want to get into trouble. But unfortunately (and not talking about yuou
          here Noah) some people problems with the sizeof(privates ) and so they spend
          their time by trolling here and show up contiguous series of knee-jerk
          reactions.
          [color=blue]
          > In my opinion the *only* reason to call a method "member function" is
          > because it is what C++ programmer terminology uses;[/color]

          Method is an operation supported by a classes interface. Therefore method
          and member function are not interchangeable . In C++ (using the OO
          terminology) freestanding operator functions found by the argument dependent
          name lookup are part of the interface provided by the object. And they are
          not member functions. For one.
          [color=blue]
          > and of course because there are some who will pretend
          > not to know what you mean, go off on some rant,
          > and may never answer the question.[/color]

          Really? How about they *don't* know what do you mean? Or they do, and give
          you the answer which is *wrong* for you, because they do NOT understand the
          word the same way as you do? Remember the thread where the greenhorn asked
          "what methods does the C++ compiler automatically generate for us". Picking
          up the *only* closest-thing-toi official-but-still-far-from-it note as a
          defintion - where Bjarne Stroustrup that some peoplecall *virtual* member
          functions methods - the answer is *NONE*. Not one method is generated.
          [color=blue]
          > The term "function" is really not an OO concept and,
          > in my opinion, it is a mistake to use it as such.[/color]

          Sure. So don't use it in OO. Here we discuss the C++ language, not OO.

          --
          WW aka Attila


          Comment

          • WW

            #35
            Re: Fundamental question about visibility

            jeffc wrote:
            [SNIP][color=blue]
            > Now that is the voice of reason. Having said all that, it's pretty
            > clear why we don't have to post a whole page like this just because
            > someone in this newsgroup uses the term "method".[/color]

            On the contrary. The above snipped post is filled with technical
            inaccuracies, tries to mix OO and C++ terminology (while C++ is
            multiparadigm) and absolutely fails the task to define the term method in
            the realm of the C++ language.

            jeffc, stop trolling!

            --
            WW aka Attila


            Comment

            • jeffc

              #36
              Re: Fundamental question about visibility


              "WW" <wolof@freemail .hu> wrote in message
              news:bkvell$9gs $1@phys-news1.kolumbus. fi...[color=blue]
              > Noah Roberts wrote:
              > [SNIP][color=green][color=darkred]
              > >> Please, if you *know* what method means in the realm of the C++
              > >> language... by all means, post it here!
              > >>[/color]
              > >
              > > Methods are actions you may request that an object carry out. You
              > > invoke 'methods' by passing 'messages'; methods are implementations of
              > > messages. This is basic OO terminology that you learn in any
              > > introductory text.[/color]
              >
              > That is the meaning of method in OO.[/color]

              We discuss OO here. C++ is an OO language.
              [color=blue]
              > That is OK. They did include the term method into their vocabulary and
              > defined its meaning.[/color]

              One can only imagine you hiding your dictionaries under your mattress, and
              reading them late at night with a flashlight.


              Comment

              • WW

                #37
                Re: Fundamental question about visibility

                jeffc wrote:[color=blue]
                > "WW" <wolof@freemail .hu> wrote in message
                > news:bkvell$9gs $1@phys-news1.kolumbus. fi...[color=green]
                >> Noah Roberts wrote:
                >> [SNIP][color=darkred]
                >>>> Please, if you *know* what method means in the realm of the C++
                >>>> language... by all means, post it here!
                >>>>
                >>>
                >>> Methods are actions you may request that an object carry out. You
                >>> invoke 'methods' by passing 'messages'; methods are implementations
                >>> of messages. This is basic OO terminology that you learn in any
                >>> introductory text.[/color]
                >>
                >> That is the meaning of method in OO.[/color]
                >
                > We discuss OO here. C++ is an OO language.[/color]

                C++ is a multiparadigm language, not an OO one.
                [color=blue][color=green]
                >> That is OK. They did include the term method into their vocabulary
                >> and defined its meaning.[/color]
                >
                > One can only imagine you hiding your dictionaries under your
                > mattress, and reading them late at night with a flashlight.[/color]

                Stop trolling! Last warning.

                --
                WW aka Attila


                Comment

                • jeffc

                  #38
                  Re: Fundamental question about visibility


                  "WW" <wolof@freemail .hu> wrote in message
                  news:bkvl4k$nn8 $1@phys-news1.kolumbus. fi...
                  [color=blue][color=green]
                  > > We discuss OO here. C++ is an OO language.[/color]
                  >
                  > C++ is a multiparadigm language, not an OO one.[/color]

                  So, just for the record, you are saying C++ is not an OO language?
                  [color=blue]
                  > Stop trolling! Last warning.[/color]

                  <snicker> Now, back to your mattress, flashlight, and dog-eared copy of
                  Proceedings of the C++ Conference, 1994.


                  Comment

                  • WW

                    #39
                    Re: Fundamental question about visibility

                    jeffc wrote:[color=blue]
                    > "WW" <wolof@freemail .hu> wrote in message
                    > news:bkvl4k$nn8 $1@phys-news1.kolumbus. fi...
                    >[color=green][color=darkred]
                    >>> We discuss OO here. C++ is an OO language.[/color]
                    >>
                    >> C++ is a multiparadigm language, not an OO one.[/color]
                    >
                    > So, just for the record, you are saying C++ is not an OO language?[/color]

                    C++ is a multiparadigm language.
                    [color=blue][color=green]
                    >> Stop trolling! Last warning.[/color]
                    >
                    > <snicker> Now, back to your mattress, flashlight, and dog-eared copy
                    > of Proceedings of the C++ Conference, 1994.[/color]

                    Stop trolling!

                    --
                    WW aka Attila


                    Comment

                    • Attila Feher

                      #40
                      Re: Fundamental question about visibility

                      jeffc wrote:
                      [SNIP][color=blue][color=green]
                      >> That is the meaning of method in OO.[/color]
                      >
                      > We discuss OO here.[/color]

                      We discuss the C++ language here, as defined by its standard. Not OO. That
                      is comp.object. I start to get the feeling you are also posting there.
                      With the name TopMind.
                      [color=blue]
                      > C++ is an OO language.[/color]

                      C++ is a multiparadigm langauge.
                      [color=blue]
                      > One can only imagine you hiding your dictionaries under your
                      > mattress, and reading them late at night with a flashlight.[/color]

                      Get a life.

                      --
                      Attila aka WW


                      Comment

                      • Noah Roberts

                        #41
                        Re: Fundamental question about visibility

                        WW wrote:[color=blue]
                        > jeffc wrote:
                        > [SNIP]
                        >[color=green]
                        >>Now that is the voice of reason. Having said all that, it's pretty
                        >>clear why we don't have to post a whole page like this just because
                        >>someone in this newsgroup uses the term "method".[/color]
                        >
                        >
                        > On the contrary. The above snipped post is filled with technical
                        > inaccuracies,[/color]

                        By all means point them out. At a very basic level I believe everything
                        was more or less correct.

                        tries to mix OO and C++ terminology (while C++ is[color=blue]
                        > multiparadigm)[/color]

                        You yourself, in a disagreement with me, claimed C++ supports the OO
                        paradigm. If this is true it must also support the terminology. If
                        indeed C++ is multiparadigm (and it of course is) then this is not a
                        problem.

                        and absolutely fails the task to define the term method in[color=blue]
                        > the realm of the C++ language.[/color]

                        If you want to use differing terminology to avoid confusion between C++
                        classes and OO Objects then I won't argue, it might even be a good idea.
                        In my opinion it is acceptable to use the OO terminology in C++ if you
                        are using the OO paradigm.

                        And to spell it out for you:

                        If you consider C++ classes to equate with OO objects then your "member
                        functions" are indeed "methods", your calls to "member functions" are
                        messages, your "member variables" are "instance variables" except when
                        they are of course "static member variables" in which case they are now
                        "class variables" (and yes, there is also "class methods"). The only
                        other altered terminology that I can think of off hand is that "Base
                        classes" are "Super classes" and "Derived" classes are "Sub" classes.

                        When you design the architecture you use these terms, why not also use
                        them as you write the code?

                        Blah, Blah, and Blah

                        NR

                        Comment

                        • Noah Roberts

                          #42
                          Re: Fundamental question about visibility

                          WW wrote:[color=blue]
                          > Noah Roberts wrote:
                          > [SNIP]
                          >[color=green][color=darkred]
                          >>>Please, if you *know* what method means in the realm of the C++
                          >>>language.. . by all means, post it here!
                          >>>[/color]
                          >>
                          >>Methods are actions you may request that an object carry out. You
                          >>invoke 'methods' by passing 'messages'; methods are implementations of
                          >>messages. This is basic OO terminology that you learn in any
                          >>introductor y text.[/color]
                          >
                          >
                          > That is the meaning of method in OO. What is the meaning of method in C++?[/color]

                          If you are using the OO paradigm while writing C++ code then they mean
                          the same thing. You could say that you implement methods in C++ with
                          functions.
                          [color=blue][color=green]
                          >>The problem with C++ is that when you pass a message to an object it
                          >>is not necissarily the one that carries out the action even if it
                          >>has overridden its parent's methods. This is only guaranteed if
                          >>the method is declaired virtual in *all* parents.[/color]
                          >
                          >
                          > That is one interesting issue. The other is that in C++ freestanding
                          > functions (due to ADL and operator overloading) may very well be considered
                          > part of a class types interface.[/color]

                          A very interesting point. They may very well be considered methods as
                          well then. It would have to be thought about more than I am prepaired
                          to right now :P
                          [color=blue]
                          >
                          >[color=green]
                          >>I suppose this is why some people would consider only
                          >>virtual 'functions' to be methods and why
                          >>others would object to a "member function" being called a method at
                          >>all.[/color]
                          >
                          >
                          > And this is already a source for confusion.[/color]

                          Of course. You must understand the limitations of the language you are
                          working with. This is always a source of confusion.
                          [color=blue]
                          >
                          >[color=green]
                          >>This is also one of the reasons I find C++ does not quite
                          >>apply the OO paradigm (which can be a strength at times).[/color]
                          >
                          >
                          > C++ is multiparadigm.[/color]

                          Few aren't, though with OO languages many are not. IMHO it is a bad
                          idea for a language to enforce a particular paradigm on all of its
                          types. One of many reasons why I hate Java.
                          [color=blue][color=green]
                          >>There is also the fact that all C++ "member functions" eventually get
                          >>altered to in fact be functions that accept class structs as
                          >>arguments. I myself don't believe this should have an impact on our
                          >>terminology as it is an implementation detail that the programmer
                          >>never really sees.[/color]
                          >
                          >
                          > Unless he starts to do tricks, like calling a member directly from C or
                          > assembly. I saw that being done in an allegedly portable system. :-) "Why?
                          > The this pointer is the first argument, everybody knows!"[/color]

                          You can always break the paradigm. In Objective-C it is also possible,
                          in fact the language supports it (IMP == a pointer to the actual
                          function version of a method). With an unpatched gdb you in fact have
                          to use the function names (complete with underscores:
                          "__i_ClasName_m ethod()") of the methods you wish to debug; I myself
                          recommend using the patch :P
                          [color=blue]
                          > Does nto have much to do with why it is wrong in C++. For example in
                          > English fast is an OK word. The same word in Hungarian means "the private
                          > parts of a man". So does that mean we should bad the word from English?
                          > Nope. Does that mean we should not use it in Hungarian?[/color]

                          I would equate the situation more like the following: fast is an ok
                          english word. In hungarian it is not. Does this mean that if we are in
                          Hungary we should not say the word fast? I would say that depends on
                          whether you are talking in English or Hungarian. C++ is Hungary,
                          Hungarian is the terms C++ uses, English is OO terminology - many who
                          live in hungary also speak english and it works well for them.

                          [color=blue]
                          > Really? How about they *don't* know what do you mean? Or they do, and give
                          > you the answer which is *wrong* for you, because they do NOT understand the
                          > word the same way as you do? Remember the thread where the greenhorn asked
                          > "what methods does the C++ compiler automatically generate for us".[/color]

                          At some point that could have been myself. I started with OO languages
                          like Java and Objective-C (deinately the better of the two)x and later
                          moved to C++. It took me a long time to supress the hate and begin to
                          like C++ for its differences.

                          There are several. In fact you could say that all C++ objects actually
                          subclass a non-existant super class which provides such things as
                          destructors, constructors, copy operators, etc... In some OO languages
                          the answer is *none* and so you subclass a super that provides these
                          interfaces or go through the pain of implementing "alloc".


                          NR

                          Comment

                          • Attila Feher

                            #43
                            Re: Fundamental question about visibility

                            Noah Roberts wrote:[color=blue]
                            > WW wrote:[/color]
                            [SNIP][color=blue][color=green]
                            >> On the contrary. The above snipped post is filled with technical
                            >> inaccuracies,[/color]
                            >
                            > By all means point them out. At a very basic level I believe
                            > everything was more or less correct.[/color]

                            You use OO *theoretical* terms (message, method) which have no equivalent
                            concepts in C++. For example in the system I make there are messages. They
                            involve several design patterns and they do work as in OO. But not because
                            C++ has messages.

                            "the only reason to call a method "member function" is
                            because it is what C++ programmer terminology uses"

                            No. The *only* reason because it is called member fucntion, because it is a
                            member function. The reason why it is nto called method is because there is
                            no one to one mapping between that OO theory term and the C++ language
                            features.
                            [color=blue][color=green]
                            >> tries to mix OO and C++ terminology (while C++ is
                            >> multiparadigm)[/color]
                            >
                            > You yourself, in a disagreement with me,
                            > claimed C++ supports the OO paradigm.[/color]

                            Where? I have said C++ is multiparadigm. You can cut with a Swiss army
                            knife like a normal knife. But talking about "the blade" is nonsense, since
                            it has more than one blade. It support the notion of knife but it is *not*
                            a knife. It is *more* than a knife. C++ supports the OO methodology, but
                            it is *not* an OO language. It is *more* than an OO language. That is why
                            some OO terms (and thanx to some other wonders like C heritage, ADL,
                            namespaces) does not one-to-one apply to it.
                            [color=blue]
                            > If this is true it must also support the terminology.[/color]

                            I have just proven it is not so.
                            [color=blue]
                            > If indeed C++ is multiparadigm (and it of course is)
                            > then this is not a problem.[/color]

                            It would only be a bigger problem if C++ had no OO support whatsoever.
                            [color=blue]
                            > and absolutely fails the task to define the term method in[color=green]
                            >> the realm of the C++ language.[/color]
                            >
                            > If you want to use differing terminology to avoid confusion between
                            > C++ classes and OO Objects then I won't argue, it might even be a
                            > good idea. In my opinion it is acceptable to use the OO terminology
                            > in C++ if you are using the OO paradigm.[/color]

                            We are not using the OO paradigm here. We are using C++. As defined by the
                            standard. And the standard has no definition of such term as method. If
                            you whish to discuss OO methodology then go to comp.objects and start with
                            killfiling TopMind.
                            [color=blue]
                            > And to spell it out for you:
                            >
                            > If you consider C++ classes to equate with OO objects[/color]

                            I don't.
                            [color=blue]
                            > then your "member functions" are indeed "methods",[/color]

                            Unfortunately yes and no. There is no one to one mapping for the
                            theoretical OO term "method" and C++ language terms.
                            [color=blue]
                            > your calls to "member functions" are messages,[/color]

                            They corellate to them.
                            [color=blue]
                            > your "member variables" are "instance variables"
                            > except when they are of course "static member variables"
                            > in which case they are now "class variables"[/color]

                            This is the only thing which I can accept as one-to-one, non-confusing
                            mapping.
                            [color=blue]
                            > (and yes, there is also "class methods").[/color]

                            Not in C++. In C++ there are static member functions. In C++ classes are
                            not first class objects.
                            [color=blue]
                            > The only other altered terminology that I can
                            > think of off hand is that "Base classes"
                            > are "Super classes" and "Derived"
                            > classes are "Sub" classes.[/color]

                            And member functions. There is no term "methods", which has an unambiguous
                            definition, known by all. It is only good to create confusion and
                            misunderstandin g. Just in this newsgroup I have seen already 3 different
                            people to sware on 3 different meanings for method in C++.
                            [color=blue]
                            > When you design the architecture you use these terms,
                            > why not also use them as you write the code?[/color]

                            Simple. For the same reason you do not use the same terms in designing the
                            architecture of a house, and designing its bricks.
                            [color=blue]
                            > Blah, Blah, and Blah[/color]

                            Yeah, it was.

                            --
                            Attila aka WW


                            Comment

                            • Attila Feher

                              #44
                              Re: Fundamental question about visibility

                              Noah Roberts wrote:
                              [SNIP][color=blue][color=green]
                              >> That is the meaning of method in OO. What is the meaning of method
                              >> in C++?[/color]
                              >
                              > If you are using the OO paradigm while writing C++ code then they mean
                              > the same thing. You could say that you implement methods in C++ with
                              > functions.[/color]

                              Yes. And you can also implement them by freestanding operator functions.
                              And who know in how many ways (actual syntax aside). Any ways ADL will find
                              them.
                              [color=blue][color=green]
                              >> That is one interesting issue. The other is that in C++ freestanding
                              >> functions (due to ADL and operator overloading) may very well be
                              >> considered part of a class types interface.[/color]
                              >
                              > A very interesting point. They may very well be considered methods as
                              > well then. It would have to be thought about more than I am prepaired
                              > to right now :P[/color]

                              Yes. That is why the term method has no meaning in the realm of C++.
                              Method is an OO term. A theoretical term. Some languages took it in as it
                              is, some not. C++ is one of those, which did not.
                              [color=blue][color=green][color=darkred]
                              >>> I suppose this is why some people would consider only
                              >>> virtual 'functions' to be methods and why
                              >>> others would object to a "member function" being called a method at
                              >>> all.[/color]
                              >>
                              >> And this is already a source for confusion.[/color]
                              >
                              > Of course. You must understand the limitations of the language you
                              > are working with. This is always a source of confusion.[/color]

                              Limitations??? You mean a multiparadigm language supporting more than OO is
                              a *limitation*??? ?
                              [color=blue][color=green][color=darkred]
                              >>> This is also one of the reasons I find C++ does not quite
                              >>> apply the OO paradigm (which can be a strength at times).[/color]
                              >>
                              >> C++ is multiparadigm.[/color]
                              >
                              > Few aren't, though with OO languages many are not. IMHO it is a bad
                              > idea for a language to enforce a particular paradigm on all of its
                              > types. One of many reasons why I hate Java.[/color]

                              C3PO also hates Jawas. He said: disquasting creatures. ;-) I love C3PO.
                              :-)
                              [color=blue][color=green]
                              >> Unless he starts to do tricks, like calling a member directly from C
                              >> or assembly. I saw that being done in an allegedly portable system.
                              >> :-) "Why? The this pointer is the first argument, everybody knows!"[/color]
                              >
                              > You can always break the paradigm. In Objective-C it is also
                              > possible, in fact the language supports it (IMP == a pointer to the
                              > actual function version of a method). With an unpatched gdb you in
                              > fact have to use the function names (complete with underscores:
                              > "__i_ClasName_m ethod()") of the methods you wish to debug; I myself
                              > recommend using the patch :P[/color]

                              :-)
                              [color=blue][color=green]
                              >> Does nto have much to do with why it is wrong in C++. For example in
                              >> English fast is an OK word. The same word in Hungarian means "the
                              >> private parts of a man". So does that mean we should bad the word
                              >> from English? Nope. Does that mean we should not use it in
                              >> Hungarian?[/color]
                              >
                              > I would equate the situation more like the following: fast is an ok
                              > english word. In hungarian it is not. Does this mean that if we are
                              > in Hungary we should not say the word fast?[/color]

                              Yes. Unless you want to get your face repartitioned and reformatted. The
                              rough transalation of what fast will be received (perceived) in Hungary is:
                              a big c*ock into your mouth you S-Whole.
                              [color=blue]
                              > I would say that depends on whether you
                              > are talking in English or Hungarian.[/color]

                              It depends.
                              [color=blue]
                              > C++ is Hungary, Hungarian is the terms C++ uses,
                              > English is OO terminology - many who live in hungary
                              > also speak english and it works well for them.[/color]

                              Nope. That parallel was only good up to the point I used it: while a word
                              can hold one meaning in one language it may not hold the same (or any
                              definable - agreed) meaning in another. The rest (what you wrote) is B/S.
                              Why? Because English and Hungarian people talk about the *same thing*.
                              While OO (theory) and C++ (implementation ) is *not*.
                              [color=blue][color=green]
                              >> Really? How about they *don't* know what do you mean? Or they do,
                              >> and give you the answer which is *wrong* for you, because they do
                              >> NOT understand the word the same way as you do? Remember the thread
                              >> where the greenhorn asked "what methods does the C++ compiler
                              >> automatically generate for us".[/color][/color]
                              [SNIP][color=blue]
                              > There are several. In fact you could say that all C++ objects
                              > actually subclass a non-existant super class which provides such
                              > things as destructors, constructors, copy operators, etc...[/color]

                              No, you cannot. Because in this case they could be converted to that common
                              base class.
                              [color=blue]
                              > In some
                              > OO languages the answer is *none* and so you subclass a super that
                              > provides these interfaces or go through the pain of implementing
                              > "alloc".[/color]

                              Yep. So let's not mix OO theory with C++ practice. They have a very strong
                              relationship but there are just things there with no one-to-one mapping.

                              --
                              Attila aka WW


                              Comment

                              • Gavin Deane

                                #45
                                Re: Fundamental question about visibility

                                "jeffc" <nobody@nowhere .com> wrote in message news:<3f7302bd_ 3@news1.prserv. net>...[color=blue]
                                > "Gavin Deane" <deane_gavin@ho tmail.com> wrote in message
                                > news:6d8002d0.0 309250324.4205c b1@posting.goog le.com...[color=green]
                                > > And how does the exchange between the OP and WW which ended with the
                                > > OP's problem solved lead you to conclude that WW wasn't helping?[/color]
                                >
                                > The part about the method was completely unhelpful. He was just saying it
                                > to show off his book knowledge of detail unrelated to the question, so he
                                > can appear authoritative, toe the party line, be part of the cool C++ geek
                                > crowd, and waste space in the newsgroup. People like that are only
                                > motivated partially by helping people. Terms like method are completely
                                > valid when discussing C++ design and code, regardless of whether the word
                                > appears in the C++ keyword list, or even the official standard. Just like
                                > base class, parent class, and superclass can be used interchangably, even
                                > though you won't find them in the language. Unlike some people, I'm not
                                > sitting here with a steel rod up my butt waiting for the next time someone
                                > uses the term superclass so I can pounce on them for using a word that
                                > doesn't exist in the language.[/color]

                                Base class, superclass and parent class AFAIK all mean exactly the
                                same thing so could be interchanged. Whether this is still true in the
                                case of non-public, virtual or multiple inheritance I don't know. If
                                there were a princilpe of OO design that said that 'superclass' was
                                not the appropriate term in multiple inheritance, then that OO
                                superclass concept would not be interchangeable with C++'s base class
                                concept.

                                C++ has member functions, static member functions, virtual and pure
                                virtual ones, friend functions and non-member non-friend functions
                                that can make up a class's interface. I may have forgotten others.
                                'Method' is not technically defined in C++. When someone asks a C++
                                design question and talks about methods, it is important to ascertain
                                which of the above list of types of class interface function they
                                regard as methods. Otherwise how can you understand the question or
                                propose a solution?

                                It is also valuable to point out that 'method' is not a C++ term.
                                Someone who has learnt the term in the context of another language or
                                general OO design principles may well not be aware of exactly how C++
                                implements the concepts.

                                I don't know why you have a problem with attention to detail. It is an
                                extremely important quality in a computer programmer, since the
                                computer has to follow precisely what you told it to do, even if you
                                meant something slightly different.

                                GJD

                                Comment

                                Working...