Dan Sugalski wrote: > Benjamin Goldberg wrote: >> Graham Barr wrote: >>> Dan Sugalski wrote: >>>> If A isa B, we certainly wouldn't want to call A's AUTOLOAD on a >>>> method before we looked to see if B had a concrete instance of that >>>> method. >>> >>> Right. The best you could probably do is note where you found the >>> first AUTOLOAD so that when you do reach the end of the ISA search >>> you don't need to do the whole search again. >> >> Unless we changed the language in such a way that we could *tell* >> whether or not we should try calling A's AUTOLOAD. > > Given that we have to run perl 5 code with the same expressed > semantics as perl 5, and also are going to run python and ruby code > properly, this isn't a tenable option. > > We're the implementors. While we can complain about the semantics we > have to express, we don't get to not express them.
Nothing says that we can't have a different semantic for each language we're running. When running perl5 code, we could fetch methods and perform method caching one way, and when running perl6 code, we could fetch methods and perform method caching a different way... and possibly a different technique for each of python and tcl. I was going to say that I probably ought to write my idea up in an RFC, and see how people react, and get Larry's approval... but, I discovered that someone else thought of this idea before me, and wrote it up! http://dev.perl.org/rfc/232.pod -- $;=qq qJ,krleahciPhueerarsintoitq;sub __{0 && my$__;s ee substr$;,$,&&++$__%$,--,1,qq;;;ee; $__>2&&&__}$,=22+$;=~y yiy y;__ while$;;print