<br>hi!<br><br>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)).<br><br>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.
<br><br>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.
<br><br>i can only think of two impl srategies currently:<br> - using macros and actually generating the generic methods<br> - 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.
<br><br>i wonder what people think about this problem and the possible solutions...<br><br>-- <br>- attila<br><br>"- The truth is that I've been too considerate, and so became unintentionally cruel...<br> - I understand.
<br> - No, you don't understand! We don't speak the same language!"<br>(Ingmar Bergman - Smultronstället)