Sumant Tambe (17) [Avatar] Offline
1. Most implementations of persistent data structures depend on GC. In C++ we’ve shared_ptr. Is it possible to do in-place update if we know that every node along the path from the root to the leaf is shared by exactly one tree?

2. Which C++ libraries would you recommend for a functional list and persistent vector? How about their licenses? Would it make sense to comment on that in the book? I know it's a moving target.
Ivan Cukic (99) [Avatar] Offline
Yes, if a node is not shared, then we can easily just do the in-place update.

There is a library called immer ( that looks very promissing. I didn't want to mention any in the book itself because while immer is the most promissing one, it is not yet widely accepted.

I am going to include it in the "further research" section which will be online and easy to update - to be able to follow the "moving target".