This is the mail archive of the mailing list for the guile project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: setf.scm

>>>>> "Per" == Per Bothner <> writes:

Per> For how implement this in Guile?  I leave that to Guile
Per> implementors.  One reason I preferred to start from scratch
Per> with Kawa is that having an object-oriented implementation
Per> core is easier to extend.

A simple hack would be to maintain a hash table mapping procedures to
setters. One could use the procedure itself to get a mapping that
followed the object or names (symbols) to get something akin to the
set-*! scheme.

Not perfect, but seems like a usable first shot not requiring
modifications to the evaluator or representations of procedure
objects. Possibly with some hacking it could even work with the module
system such that each module had its own setter obarray.

Christian Lynbech          | Telebit Communications A/S                       
Fax:   +45 8628 8186       | Fabrik 11, DK-8260 Viby J
Phone: +45 8628 8177 + 28  | email: --- URL:
Hit the philistines three times over the head with the Elisp reference manual.
                                        - (Michael A. Petonic)