At 03:54 PM 9/4/2001 -0400, Michael G Schwern wrote:
>Ummm... there should be no *language* reason why we can't override
>inline methods. It's purely an internal distinction.
I'm not so much thinking about inline methods as inline subs.
>The unfortunate problem with saying "inline methods cannot be
>overriden" is people are not going to realize this, slap 'inline' on
>their methods (cuz it's faster, you see) and screw their subclassers.
>Or they will realize it and slap it on anyway, either because they
>think the speed is more important than subclassing, or because they
>really want 'final'.
>
>Trying to optimize methods so they are "inline" in a dynamic language
>like perl is going to have all sorts of weird side-effects. Object
>method calls are currently only about 15% slower than function calls.
>I expect that gap to close in Perl 6 just with the introduction of
>proper vtables.
It's not method calls as such that'll be faster or not with methods marked
as definitive. There's also the potential to inline the sub code and then
put the inlined code through the optimizer. Some code can get a pretty
significant speedup that way. (And, then again, some code can't...)
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk