3 ms·
Intrusive trees are great for specialized use cases, but not for a general-purpose Java Collection. If the payload owns the left/right pointers, the same object
by chaos_vy 23d ago
Intrusive trees are great for specialized use cases, but not for a general-purpose Java Collection. If the payload owns the left/right pointers, the same object can't cleanly participate in multiple Maps/Sets.
ChaosTree keeps the tree topology separate from the domain objects, which is necessary for a NavigableMap-style collection.
- my-next-account 23d agoYou can have both! You can of course implement the non-intrusive case on top of the intrusive one. I think that opens up interesting use cases with Valhalla.
- chaos_vy 23d ago[dead]