Krister Svanlund <[email protected]> writes:
> In our work to look into how Python 3 could be implemented for Guile
> we have figured out that the only way to make a goops object
> applicable is to have it inherit <applicable-struct>. This does not
> always work the way it could be expected, for example when inheriting
> from several classes.

Can you elaborate on what doesn't work as expected?

> Apparently this works by some flag being set by
> <applicable-strukt> in libguile for the object and that flag is
> checked during application, calling the 'procedure slot if it's set
> with some optimization assuming that 'procedure is the first slot.
> Is this correct and if so, is there any particular reasoning behind
> this rather than just having all classes that has the slot 'procedure
> be applicable?

I see at least two problems with your suggestion: (1) it would be very
slow to search the list of slots for a slot named 'procedure' on every
application.  (2) a user might create a class with a slot named
'procedure' without intending that the slot should be used in this way.

     Mark

Reply via email to