da Silva, Joe wrote:
Yes. Linked lists are both possible and easy, with your "store" and "reference" pointer idea, provided there is a standard (ie. inbuilt) "procedure" to swap two "store" pointers. I think that's all you need to overcome the problem with linked lists.
Sorry, but to me it seems a way to solve this particular situation that occurs with simple linked lists (as you described in a previous mail) where you have an exact overview what is going on (and therefore don't need the whole concept at all -- *because* you know exactly what's going on, and could just do things correctly with normal pointers). Avoiding memory leaks with simple links lists is not exactly a difficult problem. So you add a second concept (swapping) to solve the problems caused by the first concept (store/reference) pointers, both with extra effort on behalf on the programmer and with no advantage that I can see.
AFAIK, nobody has addressed some more complex situations yet (like trees/graphs that point to each other in complex ways, and are allocated and deallocated in alomost arbitrary order) and described how this concept would improve (and not worsen) the situation.
Maybe I'm just playing devil's advocate here, but I really don't see any advantage of the concept yet (except maybe in rather special situations such as those that Markus has in mind with his collections IIUIC) ...
Frank