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

> So O(log n) then. We obey gravity around these parts.

Which is of no practical difference to O(1) if log n is always very small.

> I presume you are referring to HAMT-like structures... which are by no means unique to Clojure.

Of course they're not. My point was that it is not trivial to derive a efficient and useful data structure like a HAMT from Haskell's type system. The data structures in a library like unordered-containers are in practise just as opaque to the developer as the core data structures in Clojure.



> as opaque to the developer

http://hackage.haskell.org/packages/archive/unordered-contai...

This highly optimized data type is defined in 6 lines, easily accessible from the docs.


No it isn't, at least not in any meaningful way. The type definition itself may be 6 lines, but that doesn't adequately describe the data structure, otherwise there'd be no need for the rest of the library.




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

Search: