On Tue, Aug 28, 2001 at 05:23:46PM -0700, David Whipp wrote: > The only good justification I've heard for "final" is as a directive > for optimization. If you declare a variable to be of a final type, then > the compiler (JIT, or whatever) can resolve method dispatch at > compile-time. If it is not final, then the compiler can make no such > assumption because java code can load in extra classes later. And a very good reason it is, too. While an optimizing JIT can play tricks to achieve similar results, this won't work for something like gcj which compiles directly to native code. The fact that C++ is usually compiled to native code, while Java is not, may explain why C++ methods are (in Java parlance) final unless explicitly declared "virtual". - Damien
- Re: Expunge implicit @_ passing Michael G Schwern
- Re: Expunge implicit @_ passing David L. Nicol
- Re: Expunge implicit @_ passing Ken Fox
- Re: Expunge implicit @_ passing Michael G Schwern
- Re: Expunge implicit @_ passing Damien Neil
- Re: Expunge implicit @_ passing Michael G Schwern
- RE: Expunge implicit @_ passing Hong Zhang
- RE: Expunge implicit @_ passing Brent Dax
- Re: Expunge implicit @_ passing Michael G Schwern
- RE: Expunge implicit @_ passing David Whipp
- RE: Expunge implicit @_ passing Damien Neil
- RE: Expunge implicit @_ passing Dan Sugalski
- RE: Expunge implicit @_ passing Eric Roode
- RE: Expunge implicit @_ passing Hong Zhang
- RE: Expunge implicit @_ passing Dan Sugalski
- Re: Expunge implicit @_ passing Michael G Schwern
- Re: Expunge implicit @_ passing Dan Sugalski