[metacopy-devel] several paralell copy protocols
Attila Lendvai
attila.lendvai at gmail.com
Sun Oct 1 19:20:33 UTC 2006
hi!
there's no one-fits-all solution for copying objects (or equality check, or
hash key calculation (although this last one is the least varying)).
we need to copy queries (lisp forms) that may contain embedded persistent
objects, and at the same time we also need to copy standalone persistent
objects. but the semantics need to be different in the two situation.
so we basically need two paralell generic function protocols, like
'copy-query and 'copy-persistent-object (as opposed to the single
'copy-thing). then it would be cool if these copy method groups could
specialize each other, but it's not that important. like you have a
copy-animal protocol and then a copy-dog protocol that overrides only those
part of the copy-animal that needs to be specialized.
i can only think of two impl srategies currently:
- using macros and actually generating the generic methods
- add an implicit parameter to the copy methods that you can dispatch on.
this solution would be actually a naiive implementation of contextl, so
maybe some form of contextl integration were also enough.
i wonder what people think about this problem and the possible solutions...
--
- attila
"- The truth is that I've been too considerate, and so became
unintentionally cruel...
- I understand.
- No, you don't understand! We don't speak the same language!"
(Ingmar Bergman - Smultronstället)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/metacopy-devel/attachments/20061001/284ebe77/attachment.html>
More information about the metacopy-devel
mailing list