TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

What's new in purely functional data structures since Okasaki? (2010)

154 pointsby r4umover 9 years ago

4 comments

hellofunkover 9 years ago
Perhaps the most interesting &quot;discovery&quot; 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&#x27;s why it&#x27;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&#x27;s possibilities. This handicap is a rare example of something that is simply not so possible in C++.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;BartoszMilewski&#x2F;Okasaki&#x2F;issues&#x2F;1" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;BartoszMilewski&#x2F;Okasaki&#x2F;issues&#x2F;1</a>
评论 #11057726 未加载
评论 #11057657 未加载
评论 #11058044 未加载
评论 #11057741 未加载
评论 #11057628 未加载
davexunitover 9 years ago
I implemented Okasaki&#x27;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.
评论 #11058812 未加载
kazagistarover 9 years ago
Whats new since &quot;What&#x27;s new in purely functional data structures since Okasaki?&quot;? Its been 5+ years now...
peteretepover 9 years ago
I learned functional programming from Ralf Hinze, great to see his contributions, even if he did teach me to say &#x27;mooo-nad&#x27;.