RE: signals versus vfuncs
- From: Murray Cumming <murrayc usa net>
- To: muppet <scott asofyet org>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: RE: signals versus vfuncs
- Date: Tue, 20 Jan 2004 10:52:23 +0100
> > I don't know the perl details, but I really feel that it should be possible
> > if you override the vfunc in a C Gtype.
>
> that's what the "__PACKAGE__->install_overrides" hack does. i'm just unhappy
> that it has to be manual.
Does perl actually have the concept of virtual functions? I mean, if I
have virtual function on_something() in the base class, and I override
on_something in a derived class, if I call on_something from
A::something_else() when the instance is actually an instance of B, will
it call B::something_else() or A::something_else()? This is what C++
does when you use the "virtual" keyword on methods, and what Java does
by default.
If perl doesn't have virtual functions then maybe there's no way to do
it without requiring an explicit
"and-now-replace-the-current-implementation" step.
--
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]