Perhaps the most interesting "discovery" for me in this area is that these types of data structures are not possible in C++ as they are in other languages, due to lack of GC or tail recursion[0], either of which could make them a reality.<p>The other discovery is that some languages, like Swift, are introducing lots of surface-level functional idioms that resemble their counterparts in truly functional languages, but without the persistent structures. Since Swift is implemented in C++, no doubt that's why it's not a reality in that new language either.<p>If someone could cleverly invent an implementation of Okasaki that worked in a language like C++ (and some smart people have really tried), I think it would be a major game changer to the language's possibilities. This handicap is a rare example of something that is simply not so possible in C++.<p>[0] <a href="https://github.com/BartoszMilewski/Okasaki/issues/1" rel="nofollow">https://github.com/BartoszMilewski/Okasaki/issues/1</a>
I implemented Okasaki's persistent queue in Scheme recently using SRFI-41 streams and it was a lot of fun. Now, I need to grok things like finger trees so I can understand persistent vectors and hash tables.