RFC: New C++ Attribute: final
Gabriel Dos Reis
gdr@integrable-solutions.net
Mon Mar 1 20:37:00 GMT 2004
Joe Buck <Joe.Buck@synopsys.com> writes:
| > I sympathize you weren't successful in convincing the gurus you had to
| > speak with, but I would not reject such claims just because you had
| > spoken to gurus you could not convince. But I doubt that arguments
| > that speak of rigid ideological approaches to obejct-oriented design
| > or such will turn people mind into suddendly accepting the keyword.
| > (Quiz: Who is ideological? The people insisting or the people
| > rejecting?)
|
| I brought this up in response to your claim (OK, you say it is not your
It is not my claim. I do not hide my claims under others'.
However, it is not totally unfounded and I find it persuasive. Which
does not mean I'm for or I'm against. I can perfectly find an
argument persuasive and reject following it or decide to slavishly abide.
If you think, I'm ideological, just say so -- for I have not stated my
opinion on this keyword.
| claim, merely one that you are passing on) that those advocating "final"
I'm not known as a "mouton de Panurge". I weight both sides before
deciding especially when it is a recurring theme (meaning it is not
set once for all). This issue is not a white-or-black issue.
Contrary to you, I do not think that the opponent are totally rigid;
simularly, I do not think the proponent are totally stupid. The truth
is somewhere in the middle.
| are presenting it as a feature for "write-only codes with no proper
| design". Such claims are ideological (implying as they do that designs
I do not believe they are more ideological than the reasons that push
the proponents to bring up the issue in the first place.
| that would benefit from "final" are not proper), and are contradicted by
| proven designs in Java. The only other objection I saw is that Java needs
Well, I don't think features from one programming language translate
to another like that. One distinctive feature of Java is that by
default everything is virtual and you hardly have multiple
inheritance. Therefore one is kind of limited, and I clearly see why
I would argue for final in Java. For C++, I think I have reasons to
argue for "final", but I also can see reasons why mines or others'
presented here are not as strong as in the case of Java.
| "final" because the default is virtual, which misses the point that a
| final member function can override a virtual member function of the base
| class).
|
| > C++98 has missed useful and important features partly
| > because some proponents have taken the approach of treating their
| > opponents as "ignorant", "rigid", or "middle class anglo-saxons".
|
| I would argue that those that claim that the "final" concept is a feature
| for "write-only codes with no proper design" are doing just this.
As I said in a previous message, arguments along those lines have been
unsuccessful in the past. I doubt they will succeed for the next
round. In fact, I think that proponents arguing along those lines
are sabotaging the cause.
-- Gaby
More information about the Gcc
mailing list