[closer-devel] define-layered-method syntax
Attila Lendvai
attila.lendvai at gmail.com
Fri Jul 20 00:00:04 UTC 2007
> Common Lisp already has a notion of function names as lists, in the
> form of '(setf function-name). So that case would have to be covered
> as well.
oh, heh, to be honest i didn't think of that...
> Of course, your suggestion would have the advantage that it saves
> some space. I have already been hit by this a couple of times, trying
> to fit examples of layered methods in papers. ;) In your experience,
> how much better is your proposed syntax?
well, in situations like this "better" is a question of taste... :) i
like the proposed syntax more for its compactness and somehow my
paren-matcher (brain) can also pick up the layer name better this way.
it didn't cause me any headaches yet, but i have to admit, that i've
never wanted to work with layered setf methods... but handling them
should be doable. for example:
(d-l-m ((setf foo) some-layer) (new-value arg1) ...)
but either case, i think we should avoid playing dirty tricks with
things like (setf foo some-layer)
the background is that recently i had to reach under my d-l-m wrappers
and define a layered method on a combination of a backend and a form,
which my wrapper macros didn't support. and i got used to them so much
that the "barebone" d-l-m with its :in-layer just felt strange.
therefore this proposal/question was born.
--
attila
More information about the closer-devel
mailing list