> Oh, well... I never looked up the specification of copy in Aggregate. > Shame on me! > > But now, thinking about that specification, I don't think it makes > sense. Aggregate is a category. What does "top-level" copy actually > mean?
I though that would be a problem too. It's interesting to look how Lisp deals with this problem: http://clhs.lisp.se/Body/f_cp_lis.htm COPY-LIST: Only the list structure of list is copied; No suprise, now this is interesting: http://clhs.lisp.se/Body/f_cp_ali.htm COPY-ALIST: The list structure of alist is copied, and the elements of alist which are conses are also copied (as conses only). Any other objects which are referred to, whether directly or indirectly, by the alist continue to be shared. AKA, in our case, for List of Record, COPY-ALIST does a 'top 2-level copy'. I would like this semantic, and state clearly in documentation. > I haven't deeply looked into that issue, but it sounds like ALIST should > not be a Dictionary then. That's probably also a questionable > decision. As I have many times before, ALIST should not be TableAGG, and not Dictionary either. > No, I don't agree. First of all, Record is not a library-defined domain, > so I don't know of a specification of copy$Record(..). You are right on copy$Record, it should be a shallow copy. -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
