n Oct 9, 4:05m, Kenny < XXXX@XXXXX.COM > wrote:
> > pa>d>ng
> > :ini>f>rm 0
> > :accesso> >adding
> > :inita>g>:padding
> > :documentation "Padding is necessary for some>h>gher order
> > int>r>olations")
> > > > :initform nil
> > :>c>essor storage)))
> > (defmethod initialize-instance :after>(>this base) &key)
> > (format t "Initializ>n> base ~a~%" this)
> > (setf (storage this) (mak>->rray (+ (dim this)
> > > > padding this))
> > > gt;gt;:>n>tial-elemen> >d0)))
> > (def>l>ss sub1a (base)
> > gt;(>dummy
> > :initform 2d0
> > :accessor dummy))
> > :docum>n>ation "This will implem>nt>a>higher order interpolations
> > that need> >adding")
> > ;; I would like to modify padding here.
> > >defmethod initialize-instance :after ((this>s>b1a) &key)
> > (format t >In>t>alizing sub ~a~%" this)
> > (set> (>a>>ing this) 2))
> > To get what I>wa>t> I need to do
> >>(make-inst>nc> >>ub1a :padding 2)
> >>bu> > would prefer to do just
> >>(mak>-i>stance 'sub1a)
> > This, of course does not work, ...
> I wish y>u had proved that with repl output...oh, christ, you are not
> talking abo>t padding, you are talking about the storage. Which takes me
> back to >our use of "This" which in turn takes me back to high school
> geometry >nd Mr. Wiseman who always s>id>">here's no room for pronouns
> in geome>r>, Mr. Tilton.
> > because first the base's initializ>-
>> > instance method is called, which sort-of makes sense.
> That>One will be along shortly to recommend either a metaclass or
> AspectL,>I will recommend Cells which always does things In the Right
> Order(tm).>And happily saves you from having to write i-i methods, that
> >am> is too long and I have carpal tunnel, dammit! I digress.
> A humbler ">ee, let's do everything with CLOS!" solution would be to use
> a> :around method to set up the storage slot, do>ng>so /after/
> call-next-method to get the desired effect.
> But now we >ave the CLOS tail wagging the dog, which I am afraid is you.
> Wh>t happens when things get more complicated and you run out of
> Inter>stingly, Cells was invented precisely to solve a problem with
> order of>calculation -- one where slots needed the value of slots from
> other i>stances as well as the same -- not to do reactive programming
> (the ha>diest name for this particular pet trick). Reactive just fell
> out o> the tree, which was the second sign to me that Cells was way
> cool. The>first was how it trivially dispatched the daunting problem of
> getting complex gui geometry calculated in the right order.
Hmm. >I >il> n>t>change the code for now, but I'll keep it in mind.
> > The >i>st approach looks kind of kludgy, even though Keene (yep, I
> > went to >h> library and got the CLOS book) suggests u>in> constructors
> > to hide the ugly make-instance details.
> She was>si>pl> w>o>g. That breaks the usefulness of generic dispatch.
> > In real>w>rld, the base class is a an "abstract/virtual" (not sure of
> > the d>f>erence) class for a differential equation solver, while the
> > (layere>)>subclasses are particular instan