The idea of indexing a collection for fast associative lookup is a smell of a missing pattern in Clojure, which is graph values with graph queries. The graph query abstraction is able to optimize the lookup without the user explicitly managing the index.
I think the variety of EAV and graph projects is a step in that direction. But it's still not a zero cost abstraction. The Clojure community still needs to flesh out the protocols and language to work with them
I also might have been influenced by the use cases I was seeing in production, especially where that data comes from outside.
8
u/dustingetz Jun 06 '20 edited Jun 06 '20
The idea of indexing a collection for fast associative lookup is a smell of a missing pattern in Clojure, which is graph values with graph queries. The graph query abstraction is able to optimize the lookup without the user explicitly managing the index.