[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making every goops object applicable

From: Mark H Weaver
Subject: Re: Making every goops object applicable
Date: Mon, 14 May 2012 18:16:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Krister Svanlund <address@hidden> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]