Hacker News new | ask | show | jobs
by Artemidoros 5877 days ago
Your friend might be wasting a lot of effort (apart from his personal learning experience), as Phil Bagwell is working on Scala's collection library.
2 comments

For context to "outsiders": Bagwell wrote the papers that the Clojure datastructures are based on.
“A lot of effort?”

Wrapping the PersistentMaps took like less than 200 lines of code: http://github.com/codahale/yoink

Yes, 'a lot' is quite relative. :-)

From my point of view 200 LoC giving me something I already have is a lot. From the point of view of your friend 200 LoC might be a very small price to pay for a good learning experience.

I invite you to benchmark the two.

I'm also slightly confused as to why you think reusing stable, proven, and reviewed data structure implementations is a "good learning experience" as opposed to being SOP.

scala.collection.immutable is/will not be stable, proven and reviewed?
The hash array mapped trie was committed to trunk 3 months ago and was first released in 2.8.0.RC1 (which no one uses due to various bugs) and is now available in 2.8.0.RC2 (which very few people are using due to binary incompatibility).

In contrast, Clojure's PersistentHashMap dates back to 2007 and was in both the 1.0 and 1.1.0 releases.

Is it unreasonable to expect that Scala's persistent collections will work comparably to Closure's when 2.8 final is released?
The back of your hand is going to get sore with all those compliments.
I did not have the intention of backhanding you or your friend. If my post had the appearance of doing so, I apologize.

I just wanted to point out the (for me at least) non obvious fact that the mind behind the theory of Clojure's persistent datastructures is working on Scala's collection library and that Scala's hash maps are already backed by hash tries - http://www.scala-lang.org/archives/downloads/distrib/files/n...

Good for Scala. When it's ready, people can use that. Until then, there are interim solutions.

And it's pretty neat to see a scala proponent call a scala project a "waste of time." Way to represent for your community, bro.