On Sat, Aug 4, 2012 at 7:23 PM, Sean Corfield <seancorfi...@gmail.com>wrote:

> I hadn't even thought of using the set literal syntax with variables
> that might not have unique value. I guess I'd ask: why not use the set
> function?
>
> (let [a :x b :x] (set [a b])) ;; #{:x}
>
>
Yes, my first thought was, "I can just work around this by changing every
occurrence of something like #{a b} to (set [a b])."

My second thought was, "Oh crap.  I have to go through my entire codebase
now, and inspect every use of set literal notation, and convert everything
to something like (set [a b]) in order to guarantee I won't have a runtime
error.  Furthermore, in the process of doing so, I'll hurt the readability
of my code.  Not only is it longer, but the whole point of Clojure
providing convenient syntax for hashes and sets is to fight the visual
sea-of-sameness and make different data types pop out.  Now my sets become
just another function call.  Ugh."

-- 
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