Hacker News new | past | comments | ask | show | jobs | submit login

What's so odd about CL's hash table? Anyway, you can have immutable sets/maps/seqs with one quicklisp call: https://common-lisp.net/project/fset/Site/FSet-Tutorial.html





Hah! I've been using/committing to that lately. I think the GitHub repo is where quicklisp pulls from:

https://github.com/slburson/fset


Yes, and let me take the opportunity to thank you! (Have to do it here since you've done such a good job of hiding your email address :-)

I wish I had time for FSet work, but I just don't right now.


There is absolutely nothing wrong with Common Lisp's hash tables. They are fast and rock solid in all implementations I've tried.

The author drank too much Kool aid or is probably still in his functional programming honeymoon phase so anything mutable is of course bad and odd.


They did say "odd" not "wrong" so I'd like to hope the feeling is for slightly less dismissable reasons than an FP fetish. What I would have answered if you asked me years ago would be something like how when you come from another dynamic language you immediately notice the lack of data literal syntax without bringing in your own few-lines reader macro, then there's the need to understand the types of equality predicates, and finally the need to get used to the setf conventions. Once you get used to things though, most of which is just getting used to CL more so than its hash table choices, and discover things like alists or plists as a simpler and syntactically convenient out-of-the-box way of representing the handful of hard-coded key-value pairs which tend to make up a tiny portion of a program, the oddness is replaced by appreciation. So I wonder if the GP thinks along these lines, or some other oddity.

There's plenty wrong with hashtables in Common Lisp, they feel like an ugly bolt on. There's no convenient way to construct them or look at them (they're not readably printable, and you can't fix that yourself either). Even checking key presence in a hashtable requires multiple-value contortions.

On a more fundamental level, they also suffer more than sequences from the fact that common lisp has no well thought out concept of equality.






Applications are open for YC Summer 2020

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

Search: