> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
Doesn't make sense that way around. Remember that in a map, the key is
unique, but the value need not be. Remember that in a Lisp this isn't
just a question of arbitrary syntax. The code you write is always also
a data structure.
With the current solution I can write this, which while not obviously
useful at least has an obvious meaning:
(let [{name1 :name name2 :name} {:name "a"}]
(= name1 name2))
Your proposal would seem to allow this:
(let [{:first-name name :last-name name} {:last-name "last"
:first-name "first"}]
(= name ???))
It's not clear what this would mean.
It would also make it impossible to bind the value for a given key to
more than one variable, since map keys must be unique:
(let [{:name name1 :name name2} {:name "a"}]
;; boom? )
// Ben
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en