On Wed, Jun 15, 2011 at 9:52 AM, James Keats <james.w.ke...@gmail.com> wrote: > Hi all. I'm struggling to see the point of this (from Pragmatic's > Programming Clojure): > > Java => rnd.nextInt() > Clojure => (. rnd nextInt) > sugared => (.nextInt rnd) > > > What's the point of the sugared version? It's not any less to type.
Actually there's one fewer character -- a space. > It's also incomprehensible to me how it came about. In the middle one > it's simple, class and method, but the in sugared one it's just plain > simply bizarre looking. What was the intent? It's closer to typical function-call form: (.doSomething someNoun) resembles (do-something some-noun) more than does (. someNoun doSomething). -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp REPL. This is the language of a true hacker. Not as clumsy or random as C++; a language for a more civilized age. -- 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