[cells-devel] Re: not-to-be and owning slots

Peter Hildebrandt peter.hildebrandt at gmail.com
Mon Apr 21 08:38:21 UTC 2008


On Mon, Apr 21, 2008 at 10:12 AM, Peter Hildebrandt
<peter.hildebrandt at gmail.com> wrote:
>  - fix it in cells and change not-to-be there so it does not only
>  recurse down kids, but all owned slots?

As a proof of concept, I changed not-to-be to be

(defmethod not-to-be :before ((fm family))
  (loop for (slot . nil) in (get (type-of fm) :ownings)
     do (let ((owned (slot-value fm slot)))
	  (when (listp owned)
	    (mapc #'not-to-be owned)))))

It used to be:

(defmethod not-to-be :before ((fm family))
  (let ((sv-kids (slot-value fm '.kids)))
    (when (listp sv-kids)
      (dolist ( kid sv-kids)
        (not-to-be kid))))

I haven't committed it yet, because I'd like to hear your opinion,
especially on what this might break :-)

Peter



More information about the cells-devel mailing list