On 10/09/2017 12:36 PM, oldk1331 wrote: >> List(X): NIL or a pointer to a record r >> where r holds a value of type X and a NIL pointer >> Record(x: X): NIL or a pointer to a value of type X >> >> So the List version stores an unnecessary NIL pointer together with a >> heap allocation for a Record(x: X, next: Pointer). > > You are misleading here. > > List with one element is CONS(X, NIL) > Record with one slot is CONS(X, NIL) > > They are identical.
But that's only the case for Lisp, right? I still consider that a waste of memory. How would you map List(X) and Record(x: X) to C datastructures? Ralf -- 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.
