That does feel a bit more natural, but how would you handle :keys, :as, and :or?

On Wed, Jan 4, 2012 at 1:36 AM, Johnny Weng Luu
<johnny.weng....@gmail.com> wrote:
> One thing that seems weird is the way Clojure destructures a map
>
> I have this map: {:last-name "Vinge" :first-name "Vernor"} which is passed
> to this function: (defn greet-author-2 [{fname :first-name}] ... )
>
> Wouldn't it be better doing: (defn greet-author-2 [{:first-name fname}] ...
> )
>
> You first type the keyword, then followed by the parameter to bind to. It
> reads that the value is bound to the parameter in the same place.
>
> Feels more natural to me in a way.
>
> Thoughts?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@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+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to