On Jul 6, 2010, at 2:01 PM, Stuart Halloway wrote: > (1) Clojure APIs are very careful about parameter order.
And what if you want to use a function outside of the Clojure API? Or a function *in* the Clojure API that doesn't follow the parameter order you want? > (2) -> and ->> encourage chains of operations that build on that parameter > order. Why is that important? > (3) I haven't seen a lot of examples where something like --> solves real > problems in code. I haven't coded long enough in Clojure to provide you with any examples, but it seems like hoping that the functions you're going to use are going to have the correct parameter order is silly. Why hope when you can guarantee it won't matter? Anyways, you haven't seen a lot of examples simply because people don't have a --> to use. Thus they're are forced to work around it, for example by replacing calls to -> or ->> with the corresponding standard calls (postfix/prefix? don't remember what that style is called). If it existed, you would see it being used. - Greg > In my experience, unneeded versatility == support headache. > > Stu > >> On Jul 6, 2010, at 11:47 AM, Stuart Halloway wrote: >> >>> There is not general agreement that something like --> is more readable. (I >>> for one disagree, at least so far.) >> >> I'm very curious as to why as I find it hard to even fathom how you could >> think it's less readable to be explicit about the location of the parameter. >> >> Still, that doesn't change two facts: >> >> 1) I, and many others, find -> and ->> *less* readable because they do not >> indicate at all where the parameter is. >> >> 2) --> is more versatile than either -> and ->>. >> >> >> So why keep it out of the core library? >> >> - Greg >> >> >>> Stu >>> >>>> On Jul 6, 2010, at 8:23 AM, Meikel Brandmeyer wrote: >>>> >>>>> Hi, >>>>> >>>>> this comes up once in a while. See eg. here for an in-depth >>>>> discussion: >>>>> http://groups.google.com/group/clojure/browse_thread/thread/66ff0b89229be894/c3d4a6dae45d4852 >>>> >>>> So why hasn't it been incorporated yet into the standard library? >>>> >>>> The --> macro (or the let-> mentioned there) is more powerful than -> and >>>> ->>, and it also makes code more readable too. It seems strange therefore >>>> not to have one. >>>> >>>> - Greg >>>> >>>> >>>> >>>>> Note, that you can ease your pain a little with #(): (-> 3 (#(+ 1 % >>>>> 4)) (#(prn "answer:" %))). This is rather ugly, though. >>>>> >>>>> Sincerely >>>>> Meikel >>>>> >>>>> -- >>>>> 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 >>> >>> -- >>> 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 > > -- > 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