Thanks for the comparison Duncan !! I'd not used anything other than Clojure maps to really get a feel for their usage and syntax..
What I enjoy from the Clojure maps:
Define the map:
(def my-map {:foo "bar" :took "fool" :tuna "salmon"})
The keys are defined as functions that can return the value they refer to on the map.
> (:foo my-map)
"bar"
> (:took my-map)
"fool"
When you're pattern matching or destructuring them you can use this technique to cherry pick the ones your interested in.
(let [{:keys [tuna took]} my-map]
(apply str took tuna))
or you can do this:
(let [{foo :foo fish :tuna} my-map]
(apply str foo fish))
I don't think we can get away with the cleverness of using the keys as functions to access the elements of the map. Or at least I can't immediately think of a way to do it.. Probably at 2am when I don't have a notepad to hand. -.-
I expect we can probably become pretty creative when it comes to the pattern matching or destructuring though. :D
I like Robs idea of ensuring we have the basics there first with:
make-map (like make-record)
map-get
map-set
Do we need a defmap ?
Because from there we can create the functionality surrounding it using all of the built in maps:foo() capability and Lispy deliciousness. I know it's kinda boring but maybe once we have them in, we can then start to really mess with what's capable, and we'll be able to see what's missing?
I really really want to keep the ':=' and '=>' syntax, I think they just nailed that. But first things first. :)
Sean