|
|
|
|
|
by pkolaczk
1885 days ago
|
|
1. You can solve these issues with weak references. 2. A lot of stuff that need doubly-linked lists is enclosed in libraries anyways, so you don't need to worry about it. 3. Reference cycles are ugly even in GCed environments and generally should be avoided. They make programs hard to understand and follow. |
|
Really? Using a lookup table to annotate objects externally instead of stuffing annotations inside the objects themselves makes programs harder to understand and follow? No, it's having objects with hundreds of fields that get gradually filled by different places in code too makes programs harder to understand, because it's unclear what data is available where and when. Having children in tree-like structures have pointers to their parents makes programs harder to understand and follow? Again, no: when traversing a tree one can do without to-parent pointer available in the children by stuffing it in the traversal context, but that too makes the program harder to understand.