I have an idea in my head, and I can't quite put all the details
together.  The intent with of this posting is to start a healthy
debate of the merits of -> vs. comp.  I know people on this list will
think of something.

After designing my own Clojure libraries for a while, I've come to a
conclusion in the -> vs. comp debate. I think comp & partial is a
better choice than ->, because they return a closure. I believe
working with closures have the following advantages

* It "just works" with higher order functions, like map or filter.
* comp, like any other function, can be swapped out. As long as the
result is a closure, the rest of the code will "just work". This makes
swapping out a monad more straightforward.
* comp & partial can be applied to a list, -> cannot.

Given these reasons, I'd like to make a proposal. Contrib should be
centered around closures, not ->.

In order to generate closures, every function should take parameters
first, and data at the end, so that they work well with partial. When
possible, higher order functions should be given preference over
macros.
--~--~---------~--~----~------------~-------~--~----~
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