public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Sturm <jsturm@one-point.com>
To: Nathan Sidwell <nathan@codesourcery.com>
Cc: Kevin Atkinson <kevina@gnu.org>,
	Mark Mielke <mark@mark.mielke.cc>, <gcc@gcc.gnu.org>
Subject: Re: RFC: New C++ Attribute: final
Date: Mon, 01 Mar 2004 19:39:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.44.0403011020550.11117-100000@ops2.one-point.com> (raw)
In-Reply-To: <40435108.4090809@codesourcery.com>

On Mon, 1 Mar 2004, Nathan Sidwell wrote:
> Jeff Sturm wrote:
> > If a base class declares a method 'virtual' in C++, can a derived class
> > override the modifier, such that calls to the overridden method do
> > not require vtable dispatch?
> Only when the dynamic type can be determined at compile time.

I see...

>  From a programmer's perspective, why is it desirable to remove the
> virtuality?

For C++, I can't think of a good reason besides performance.  In Java, I
think 'final' is essential to the security framework.

In practice we often use 'final' to trigger a compilation error if someone
tries to override a method we wouldn't normally expect to be overridden,
if only to force the developer to examine it closely.  However the first
time someone removes the final modifier, we lose that benefit.

Jeff

  parent reply	other threads:[~2004-03-01 19:39 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-29  5:50 Kevin Atkinson
2004-02-29  6:51 ` Mark Mielke
2004-02-29  6:56   ` Kevin Atkinson
2004-03-01 10:20     ` Nathan Sidwell
2004-03-01 13:51       ` Per Abrahamsen
2004-03-01 20:58         ` Kevin Atkinson
2004-03-01 23:05         ` Robert Dewar
2004-03-01 14:51       ` Jeff Sturm
2004-03-01 15:02         ` Gabriel Dos Reis
2004-03-01 15:04         ` Nathan Sidwell
2004-03-01 18:53           ` Joe Buck
2004-03-02 10:01             ` Nathan Sidwell
2004-03-01 19:39           ` Jeff Sturm [this message]
2004-03-01 19:57             ` Gabriel Dos Reis
2004-03-01 20:18               ` Joe Buck
2004-03-01 20:57                 ` Gabriel Dos Reis
2004-03-01 21:22                   ` Joe Buck
2004-03-01 21:40                     ` Gabriel Dos Reis
2004-03-02 16:59               ` Alexandre Oliva
2004-03-02 17:33                 ` Gabriel Dos Reis
2004-03-02 22:54                   ` Alexandre Oliva
2004-03-02 23:24                     ` Daniel Berlin
2004-03-03  0:09                       ` Richard Henderson
2004-03-03  0:23                         ` Dale Johannesen
2004-03-03  0:33                           ` Richard Henderson
2004-03-03  0:39                             ` Dale Johannesen
2004-03-03  0:27                       ` Alexandre Oliva
2004-03-03  0:57                         ` Gabriel Dos Reis
2004-03-03  3:53                           ` Alexandre Oliva
2004-03-03 11:08                             ` Gabriel Dos Reis
2004-03-03 16:49                               ` Alexandre Oliva
2004-03-03 17:34                                 ` Gabriel Dos Reis
2004-03-03 18:12                                   ` Joe Buck
2004-03-03 19:04                             ` Gabriel Dos Reis
2004-03-03  0:52                     ` Gabriel Dos Reis
2004-03-03  1:51                       ` Joe Buck
2004-03-03 11:37                         ` Gabriel Dos Reis
2004-03-01 18:45       ` Joe Buck
2004-03-01 18:56         ` Gabriel Dos Reis
2004-03-01 19:11           ` Joe Buck
2004-03-01 19:48             ` Gabriel Dos Reis
2004-03-01 20:09               ` Joe Buck
2004-03-01 20:37                 ` Gabriel Dos Reis
2004-03-01 18:34   ` Joe Buck
2004-02-29  7:18 ` Phil Edwards
2004-03-01  6:15   ` Kevin Atkinson
2004-03-01  8:04     ` Kevin Atkinson
2004-03-02 20:58 ` Matt Austern
2004-03-02 21:24   ` George Garvey
2004-03-03  1:21     ` Gabriel Dos Reis
2004-03-02 23:10   ` Joe Buck
2004-03-03  0:30     ` Alexandre Oliva
2004-03-01 19:03 Cheng, Cheuk
2004-03-01 19:34 Chris Lattner
2004-03-03  0:33 Robert Dewar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0403011020550.11117-100000@ops2.one-point.com \
    --to=jsturm@one-point.com \
    --cc=gcc@gcc.gnu.org \
    --cc=kevina@gnu.org \
    --cc=mark@mark.mielke.cc \
    --cc=nathan@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).