[cairo] Bindings and virtual functions
Adam Lofts
adam.lofts at gmail.com
Sat May 28 04:05:45 PDT 2005
On Thu, 2005-05-26 at 16:08 -0400, mental at rydia.net wrote:
> Wouldn't that be better accomplished through explicit delegation
> rather than inheritance?
>
This is a matter of taste. I don't think restricting the flexibility of
the interface by not marking the functions virtual is justified by
anyones views on how a program should be written.
> Making the Cairo calls virtual seems misleading -- after all, if
> save or restore were called via another language binding, the
> overridden save or restore methods wouldn't get called anyway.
This is the sole disadvantage of making the functions virtual - that
they would not really be virtual in a full sense.
So, I think the manual should be changed to recommend allowing deriving
from cairo_t, since this seems to be agreed upon?
As for virtual functions, no-one seems to agree with me - so do as you
will!
Adam
More information about the cairo
mailing list