A pedantic Pete would mention C++ has member functions.
A pedantic Pete would mention C++ has member functions.
Go Pete!
The choice (in C++ and then Java and C#) to pretend that these "member functions" are somehow part of the data structure also more or less guarantees that some students will end up confused about what's actually in the physical representation. Of course the "git gud noob" mindset of C++ doesn't see that as a problem :/
C++ has plenty of warts to complain about, however complaining for the sake of complaining usually doesn't win attention.
I think that C had members, so members that are functions just became that. But then again, members that are types are usually called nested types.
Example, Turbo C++ manual from 1990, 8 years before the standard.
It is no different from several languages having their own meaning for functor, e.g. it has three different meanings across C++, Haskell and Standard ML/OCaml.
Or what mixins mean between several OOP languages.
The C++ community default hostility to everyone always really sucks. Useless, counter-productive pedantry forms part of this - NOT the parent is has been polite. Yes I'm being hostile, to Pete, who does not exist. Bjarne does, he likes belittling people in public. The C++ community is not hostile to him about doing it. Should some of us be doing that sometimes?