Well, for the comma to be useful, it cannot require whitespace separation on either side. It would be weird if you had to write [1 , 2 , 3]. So, it shouldn't be surprising that 'list,' is read as 'list' when '123,' is read as '123'.
Regarding the strangeness of comma-as-whitespace if you're coming from a Lisp background, I admit I initially disliked it but have grown fonder of it over time. That was a little surprising to me. I generally don't favor syntactic distinctions without a difference, e.g. case-insensitive symbol reading in Common Lisp, PLT Scheme's [ and ] as synonyms for ( and ), etc. -Per On Fri, Apr 2, 2010 at 6:10 PM, Mark J. Reed <[email protected]> wrote: > try this one: > (list,1,2,3) > :) > Per: I'd say it's also weird if you're coming from a Lisp background - just > weird in the opposite direction. But not so weird that it's not useful, > mostly for separating key/value pairs from other key/value pairs in a map. > It's like Perl's "fat comma" arrow operator in that sense - syntactically > no different from comma, but stylistically helpful. > > On Fri, Apr 2, 2010 at 1:52 AM, Per Vognsen <[email protected]> wrote: >> >> It doesn't feel right only if you still think you are programming in >> an Algol-style language where , is a separator token. >> >> I can't imagine this is going to change. >> >> -Per >> >> On Fri, Apr 2, 2010 at 12:37 PM, Frank Siebenlist >> <[email protected]> wrote: >> > Even though the specs clearly say that commas are whitespace, the >> > following repl session doesn't feel "intuitively" right: >> > >> > ... >> > user> (list 1 2 3) >> > (1 2 3) >> > user> (list 1, 2, 3) >> > (1 2 3) >> > user> (list 1, 2, , 3) >> > (1 2 3) >> > user> (list 1, 2, nil , 3) >> > (1 2 nil 3) >> > ... >> > >> > "," is same as ", ," is same as " "... big gotcha for beginning >> > clojurians... >> > >> > Enjoy, Frank. >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups "Clojure" group. >> > To post to this group, send email to [email protected] >> > Note that posts from new members are moderated - please be patient with >> > your first post. >> > To unsubscribe from this group, send email to >> > [email protected] >> > 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 [email protected] >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/clojure?hl=en >> >> To unsubscribe, reply using "remove me" as the subject. > > > > -- > Mark J. Reed <[email protected]> > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > [email protected] > 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 [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
