[closer-devel] slots on layers
Attila Lendvai
attila.lendvai at gmail.com
Mon Sep 15 20:35:44 UTC 2008
> True, that implementation seems more simple (although I think my suggestion
> is not that complicated either, but I'm probably not communicating it well
> enough at the moment).
my concerns are mostly related to debugging a random problem with this
machinery operating in the background. also i think that it's a middle
ground solution that on one hand has lost its simplicity and on the
other hand doesn't give a generic solution, either (see below)...
> I am very interested to hear more about this, because this seems to be a
> part where I can double check whether "my" dynamic environments are general
> enough to support such things:
it's available at:
http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=cl-dwim-wui;a=summary
search for call-in-component-environment and
with-restored-component-environment.
starting the thing is more pain than it should be for now, especially
when you want to use the interesting part (the metagui that can
present a random cl-perec ER model).
> + To what extent is your machinery more fine-grained? Can you select which
> special variables are captured and which aren't? Or do you mean something
> else here?
it's basically a generic method called for each component in the
component path to the root, in a definite order. so you can bind
whatever you want in :around methods...
of course it means that it's more trouble to rebind variables with
this infrastructure than it would be with a dedicated dynamic
environment support. but on the other hand we can run code if needed,
as opposed to simply reinstating special bindings. and also it's a
specialized infrastructure related to components/gui's, nothing
generally usable.
btw, i think the generic solution to this problem would be to have
continuations (either delimited or not) with dynamic-wind support
(e.g. as in scheme). for me anything else feels as a specific solution
given to a certain use-case. in fact if i really needed this generic
language feature, then i would implement closure based CPS in
cl-delico (it only has an interpreter for now) and add dynamic-wind
support to it.
so, to sum up my current state of mind: i'd implement layer instance
modification using a specialized cloning (random sideffect: much
faster slot access on layers); do our specialized one-shot
continuations using some light macrology (as currently done); and if i
ever wanted to have all this in a generic way, then i'd extend
cl-delico with dynamic-wind.
but i'm right before falling asleep, so... :)
--
attila
More information about the closer-devel
mailing list