Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I know about FSet and have used it in production. It indeed is a library that has an immutable data structure.

FSet's solution to the equality "issue" is by having a generic function COMPARE which will return :LESS, :GREATER, and whatnot.

FSet goes to length describing the issues embedding immutable data structures in an inherently mutable language. Things like RENAME-PACKAGE screw up invariants that FSet expects.

Lastly, FSet admits that it isn't exactly performant, it's just good enough, which was the point I was trying to make.

Aside from a few gripes I have, it's a good library to use, especially in multithreaded environments where you don't want to deal with locking and whatnot.



Glad to hear you like FSet! (Not sure if you noticed: I am the author.)

I protest, though, that there's nothing about Common Lisp that makes FSet slower than Clojure. Rich Hickey used a very clever data structure called a Hash Array-Mapped Trie to implement Clojure sets and maps, and (I think) an Okasaki-style sequence implementation. FSet, in contrast, uses balanced binary trees for all these types. That's the source of the performance difference, not anything about CL.

What are your gripes about FSet?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: