Doesn't this amount to arguing over what color the bike shed should be? [1]
Is there anything I could do with Clojure with an aesthetically different (but functionally identical ) set notation that I cannot do with Clojure right now? Anyway, no matter how beautiful a new set notation might be (not that I personally think {{}} is beautiful), it seems that having two notations for one concept would be more confusing than having one notation for one concept. You *know* that this question would appear on a regular basis, "What is the difference between #{} and {{}}?" [1] http://bikeshed.com/ On Friday, March 23, 2012 8:44:27 PM UTC-7, Cedric Greevey wrote: > > #{foo bar baz} is somewhat ugly. It occurs to me that one could modify > the reader to additionally accept > > {{foo bar baz}} > > without breaking anything. It's not possible for it to be a valid map > literal, because the outer {...} pair has only one object inside it > and a map literal requires an even number of objects (zero, two, four > ...), so right now {{foo bar baz}} will just throw a > CompilerException, and so will {{foo bar baz quux}} even though the > inner {...} pair then has an even number of objects. Making the reader > treat that as a set literal is therefore a purely additive change. > > It's one character longer than #{foo bar baz} but it looks nicer, IMO, > and still shows the cousin-ship between sets and maps by using the > same choice among {}, [], (). > > -- 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