objects and trolls

Discussion in 'C++' started by Paul, Feb 20, 2011.

  1. Paul

    Paul Guest

    I believe Leighs has made a few incorrect statements about objects in C++. I
    would resond to his post but since his is a troll thread I don'#t want to be
    involved with that.

    Here are some correct facts:

    In C++ member functions come in two flavours static and nonstatic.
    a)A static member function is a member of only the class and it is not
    associated with any object.
    b) a nonstatic member function is associated with an object( an instance of
    a class type)


    In C++ an object is not *simply* a region of strogare as Leigh incorrectly
    states. The C++ standards defines an object as a region of storage. Note:
    there is no "simply" in the definition.
    Now the word object here has a different meaning because the stadard used
    the word object to mean lots of things, for example, in the standard:
    a pointer is an object,
    a built-in type is an object,
    almost anything is an object in the context of the C++ standard.
    This is certainly not consistent with the general use of the word object in
    the context of an instance of a class type.
    Saying a member function is 'part of' an object is an OOP concept and the
    context of the word 'object' here is not the same as in the C++ standard. It
    is not necessarry for the function code to literally reside in the same
    memory location as its respective object for it this concept to be
    acceptable.
    Leigh is taking the word 'object' from the context of the C++ standard and,
    after tweaking the definition by adding the word 'simply', applying it
    inappropriately. It is possible for the C++ standard to use the word object
    in its own context because the C++ standard is not intended as a reference
    for all possible implementations of C++ OOP mechanisms.


    The member function is dependant on the existence of the object. To support
    OOP, which the C++ language does, the implementation of a nonstatic member
    function must support the concept that it's a member of an object.
    With Leigh's suggestion that objects are simple storage regions with no
    member functions, this does not support OOP, but C++ does support OOP so
    Leighs interpretation must be wrong.

    Note: Leigh also blabs on about machine code, best to ignore that I think he
    is desperately looking for a way to prove me incorrect after he took a
    beating on the old asm discussion ;-)
    Paul, Feb 20, 2011
    #1
    1. Advertising

  2. Paul

    Paul Guest

    "Leigh Johnston" <> wrote in message
    news:...
    > On 20/02/2011 18:18, Paul wrote:
    >> I believe Leighs has made a few incorrect statements about objects in
    >> C++. I would resond to his post but since his is a troll thread I don'#t
    >> want to be involved with that.
    >>
    >> Here are some correct facts:
    >>
    >> In C++ member functions come in two flavours static and nonstatic.
    >> a)A static member function is a member of only the class and it is not
    >> associated with any object.
    >> b) a nonstatic member function is associated with an object( an instance
    >> of a class type)
    >>
    >>
    >> In C++ an object is not *simply* a region of strogare as Leigh
    >> incorrectly states. The C++ standards defines an object as a region of
    >> storage. Note: there is no "simply" in the definition.
    >> Now the word object here has a different meaning because the stadard
    >> used the word object to mean lots of things, for example, in the
    >> standard:
    >> a pointer is an object,
    >> a built-in type is an object,
    >> almost anything is an object in the context of the C++ standard.
    >> This is certainly not consistent with the general use of the word object
    >> in the context of an instance of a class type.
    >> Saying a member function is 'part of' an object is an OOP concept and
    >> the context of the word 'object' here is not the same as in the C++
    >> standard. It is not necessarry for the function code to literally reside
    >> in the same memory location as its respective object for it this concept
    >> to be acceptable.
    >> Leigh is taking the word 'object' from the context of the C++ standard
    >> and, after tweaking the definition by adding the word 'simply', applying
    >> it inappropriately. It is possible for the C++ standard to use the word
    >> object in its own context because the C++ standard is not intended as a
    >> reference for all possible implementations of C++ OOP mechanisms.
    >>
    >>
    >> The member function is dependant on the existence of the object. To
    >> support OOP, which the C++ language does, the implementation of a
    >> nonstatic member function must support the concept that it's a member of
    >> an object.
    >> With Leigh's suggestion that objects are simple storage regions with no
    >> member functions, this does not support OOP, but C++ does support OOP so
    >> Leighs interpretation must be wrong.
    >>

    >
    > In C++ a member function is a member of a class not a member of an object;
    > in C++ an object is simply a region of storage; in C++ a non-static member
    > function is *invoked* on an object it is not part of an object.


    Rubbish , if this was the case C++ would not support OOP.
    Members declared in a class are part of an object of that class type, unless
    declared static.
    You obviously fail to accept this.
    Paul, Feb 20, 2011
    #2
    1. Advertising

  3. Paul

    James Kanze Guest

    On Feb 20, 6:18 pm, "Paul" <> wrote:
    > I believe Leighs has made a few incorrect statements about
    > objects in C++. I would resond to his post but since his is
    > a troll thread I don'#t want to be involved with that.


    So you prefer creating another troll thread.

    From the jargon file:

    troll:
    1. To utter a posting on Usenet designed to attract predictable
    responses or flames; or, the post itself. [...]
    2. An individual who chronically trolls in sense 1;[...]

    > Here are some correct facts:


    The argument is purely linguistic, which means that the only
    relevant fact is what either the authorities (the C++ standard),
    or a consensus within the target community (the C++ users
    community).

    --
    James Kanze
    James Kanze, Feb 21, 2011
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bigbinc
    Replies:
    3
    Views:
    389
    Michael Borgwardt
    Nov 18, 2003
  2. 7stud
    Replies:
    11
    Views:
    674
    Dennis Lee Bieber
    Mar 20, 2007
  3. ghoetker
    Replies:
    1
    Views:
    368
  4. Hal Fulton
    Replies:
    0
    Views:
    92
    Hal Fulton
    Sep 6, 2006
  5. James Britt
    Replies:
    2
    Views:
    76
    H- 16
    Apr 11, 2010
Loading...

Share This Page