guile-user
[Top][All Lists]
Advanced

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

Re: [GOOPS] Specializing <generic> to allow lazy method addition


From: Stephen Compall
Subject: Re: [GOOPS] Specializing <generic> to allow lazy method addition
Date: 27 Jan 2004 17:27:52 -0600
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Mikael Djurfeldt <address@hidden> writes:

> While the MOP for <class> works, the MOP for <generic> isn't yet
> implemented.  This is a shame and I've for very long had had the hope
> to find time to fix it.  What we really quickly should do is to
> document this situation so that people know that they cannot yet
> subclass <generic>.
> 
> The purity flag, which you ask about, marks that a class is
> "untouched" by the user so that the C runtime can count on specific
> slots existing and residing at specific locations within an object.
> 
> The idea is that the runtime will look for specialized functions only
> if the class isn't pure.

Please tell me if this is accurate: all the Scheme-level procedure
calls in libguile eventually go through scm_apply in eval.c, which
contains a switch-on-type for the various kinds of applicable objects.
The case that calls `scm_apply_generic', the generic I added a method
to in trying to make a callable class, first checks for one of the
flags in the struct, which is why I get "wrong type to apply" anyway.

I ask this because I am more interested in making objects of any class
applicable.  One case of this is my makefile processor, which
essentially processes forms, and used to be in closure form (where you
applied the `object' to each form).

--
Stephen Compall or s11 or sirian

The Tao doesn't take sides;
it gives birth to both wins and losses.
The Guru doesn't take sides;
she welcomes both hackers and lusers.

The Tao is like a stack:
the data changes but not the structure.
the more you use it, the deeper it becomes;
the more you talk of it, the less you understand.

Hold on to the root.

JSOFC3IP number key monarchist SWAT ARPA credit card gamma ASIO
quarter S Key Watergate assassinate lock picking colonel MD2




reply via email to

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