develooper Front page | perl.perl6.language | Postings from January 2002

Re: Some Apocalypse 4 exception handling questions.

Thread Previous | Thread Next
From:
Larry Wall
Date:
January 24, 2002 10:32
Subject:
Re: Some Apocalypse 4 exception handling questions.
Message ID:
200201241832.KAA21429@wall.org
Damien Neil writes:
: On Wed, Jan 23, 2002 at 06:00:21PM -0500, Melvin Smith wrote:
: > >final and private are completely different concepts as I understand
: > >them.
: > 
: > I wouldn't say "completely different". They are both used for "enforcement"
: > of similar means, but you are correct, they are different.
: 
: I view "final" as being most useful in an optimization sense.  A final
: method may be safely inlined, and does not require a vtable entry.

That may be a choice that is best left up to the user code, not the
class.  As a class designer, you really can't know if someone is going
to want to derive from your class someday, but as a mere mortal writing
a specific application, you can sometimes be pretty sure that you're
not interested in dealing with "more derived" data.  Plus you know
where your tight loops are, and where you're willing to trade off
future generality for current performance.

Larry

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About