This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: New C++ Attribute: final


On Mon, Mar 01, 2004 at 08:38:43PM +0100, Gabriel Dos Reis wrote:
> I don't know of the gurus you have had to speak with, but the ones I
> have had spoken and work with just don't use virtual functions for
> matrices or any other classes that have value semantics.  Not that
> they don't like what is fuzzily called "object oriented" programming
> -- they actually have design in layers where the non-"computational"
> part is presented to users through abstract classes.

I addressed this point when I described the alternative of using
STL-style approaches coupled with adapters, which can be implemented
as abstract classes.  Yes, this approach can be made to work, but it
requires the building of two designs rather than one: completely
nonvirtual computation coupled with virtual accessors. 

> 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
claim, merely one that you are passing on) that those advocating "final"
are presenting it as a feature for "write-only codes with no proper
design".  Such claims are ideological (implying as they do that designs
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
"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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]