[EMAIL PROTECTED] wrote:
>
> On Fri, Jun 29, 2001 at 09:50:55AM -0400, Dan Sugalski wrote:
> > Besides, there are languages that do this on a per-object basis all the
> > time anyway (aren't there? I think there are) in which case it makes sense
> > to yank it into the core interpreter, as it'll be supporting more than just
> > perl.
>
> *buzzzz* false logic. If you can do something via a core module, it
> is supported by Perl. Or does Perl not do CGI, web stuff, databases,
> etc...?
>
> Anyhow, Self is the only one I can think of. ALL THE FULL-TIME SELF
> PROGRAMMERS HERE, PLEASE RAISE THEIR HANDS! ;)
Uh, C++ virtual methods can be overloaded on a per-object basis, not
just a per-class basis, since the object drags around its virtual jump
table with it wherever it goes, so the jump can get compiled into
"jump to the address that is <offset> bytes away from the start of
the object that is doing the method" which is pretty light, unless
you've got dozens of virtual methods.
In practice, they get overloaded in aggregate, but the constructors
have to fill those values in, and they have names, and they can be
explicitly altered, if you want to have one widget that frobs differently
from all the other widgets you can set that up without devising another
class. C++ I'm talking about here.
--
David Nicol 816.235.1187
"Perl was born in downtown Hell!" -- Matt Youell