4 ms·
In Clojure, the default collection for data modeling is the map (and has literal support). Unlike javascript, properties are namespaced so you can extend someon
by cgrand-net 15y ago
In Clojure, the default collection for data modeling is the map (and has literal support). Unlike javascript, properties are namespaced so you can extend someone else map without fearing a nameclash.
Records (which are objects with a user defined types) are maps too so the upgrade is easy (and yes you can add you own fields to an object).
- gruseom 15y agoSure, but maps are still bolted on. That's convenient, but it's not interesting. The interesting question is, what would a language that is to maps as Lisp is to s-expressions look like? The OP is the first person I know of who's tried to answer that. It's an important question because maps are flexible and flexibility is important for exploratory programming, which is nearly all programming. If there exists a language that is as regular and programmable as Lisp but organized around maps rather than lists, that would be a big deal.