3 ms·
I'm not against the idea of using maps for (almost) everything. It's definitely convenient and something I do in Clojurescript. That said, I mostly use Common
by lokedhs 11y ago
I'm not against the idea of using maps for (almost) everything. It's definitely convenient and something I do in Clojurescript.
That said, I mostly use Common Lisp, and I really enjoy CLOS. As far as I can tell none of his examples would be any more complex in CL if the objects were CLOS instances.
It's definitely safer to use a slot reader in CLOS than the keyword functions that look up a value by key in Clojure. This is not helped by the fact that :foo returns nil instead of throwing an error if the key :foo doesn't exist in the map.