This is definitely not a JVM limitation, it is a design choice. There are lisps that have automatic currying, e.g., Qi (http:// en.wikipedia.org/wiki/Qi_(programming_language)). I think the main issue, why this is not convenient, is that Clojure functions tend to accept a variable number of arguments where in Haskell, one would resort to lists. Addition is an example where any non-negative number of arguments is fine. If (+ 3) was a function, then you would not be able to (apply + u) to get the sum of the list u when u is of length one.
-- Peteris Erins On Dec 29, 1:40 am, ron <clag...@gmail.com> wrote: > Hi everybody..I've a little question..the way in than clojure > implement curry is affected for the jvm or it is a "Rick > decision" ...in haskell every function accept only one parameter and > if you call a function with >1 parameter it use currying...I feel than > it is really natural and more clean than use "partial" > > for example map function > a translation haskell map (+3) [1,2,3] to clojure must be > > (map (+ 3) '(1 2 3)) much more clean than > (map #(+ 3 %) '(1 2 3) or even > (map (partial + 3) '(1 2 3)) > > in this example the difference is not so dramatic but in more extenses > codes you can really note a big difference... > > I'm a clojure newbie and I like a lot clojure...but many times I feel > than haskell do the code much more cleaner and I presume than maybe it > would be for the jvm limitations... > > thanks a lot -- 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