Re: Is it legal code?
On Feb 21, 11:48 am, "Paul" <pchris...@yahoo.co.uk> wrote:
"James Kanze" <james.ka...@gmail.com> wrote in message
[...]
In practice, as someone else has pointed out in this thread, you
can take the address of a non-static member function, with or
without the presense of an object. Which seems like
a conclusive argument that whatever non-static member functions
might be, and whether they exist or not, their reality or status
or whatever is independent of any object.
I have pointed this out , but I aslo pointed out this would
not be standard complaint. I disagree with your analysis,
I think the standard defines a rule that means a function
cannot exists without an object, the opposite of your
conclusion.
So what am I taking the address of, when I take its address.
Given something like:
struct Toto
{
void titi();
};
int
main()
{
void (Toto::*pmf1)() = &Toto::titi;
// What does pmf1 point to, if Toto::titi
// doesn't exit?
Toto* p1 = new Toto;
Toto* p2 = new Toto;
void (Toto::*pmf2)() = &Toto::titi;
// And what about here, since according to
// your logic, there are now two Toto::titi?
}
No matter how you cut it: if existance has any meaning for
a member function, it exists for the entire time the program
runs, regardless of the presence or absence of instances.
But in the end, who cares?
What kind of attitude is that? If you don't accept the rules
of the language, that's hardy good pr for you as
a professional.
What does your argumentation have to do with the rules of the
C++ language? It's purely a lexical dispute.
The whole discussion sounds more
like metaphysics than anything useful. Pragmatically, if you
want to communicate, you use the same vocabulary as everyone
else, even if you think it less than ideal. And if you don't
want to communicate, why bother posting at all?
People around here keep thinking they speak for the majority
but this is not the case.
Except that you can't find anyone speaking differently, at least
where C++ is concerned.
Just take alook at your argument in the stl thread James , you
originally started of arguing with the majority , then later
it evolves that you don't even support that cause. You just
argued on-sdie with Pete becker etc because they seemed like
the stronger side to be on., this doesn't mean everyone
arguing against you has a failure to communicate.
In the case of the STL argument, I've argued consistently that
the term is ambiguous. Unlike the current discussion, there is
no consensus among C++ practitionners as to what STL means. In
some ways, this is regretable, but neither I nor anyone else can
force consensus. (Luckily, in the case of the meaning of STL,
the distinction isn't really important.)
--
James Kanze