Arc Forumnew | comments | leaders | submitlogin
1 point by drcode 6149 days ago | link | parent

I think variadic functions tend to be library (general) functions, whereas actual applications are often full of fixed arity functions. For instance, I think you will find that news.arc is full of fixed arity functions.

I believe that looking at the arc libraries when judging the value of implicit currying may be misleading, since its greatest value is in code written for a single application...



3 points by absz 6149 days ago | link

This is certainly true, at least to an extent, but it makes currying inconsistent, which is irritating. I'm not convinced that [] and par create substantially longer code than implicit partial application, which (as noted) has issues. And the other problem, as was pointed out, is optional parameters; since they are similar to rest parameters, the objection is similar, but the problem is more insidious.

-----

1 point by ecmanaut 6147 days ago | link

Since the arity information is lost for any complement ~f (for instance, but any general or composed function will do) of a function f:

  (def complement (f) (fn args (no (apply f args))))
automatic currying turns all composed functions into second degree citizens, which adds programmer burden to the use of any function, in keeping track of whether it will invoke or return a new function.

Such blessings are plagues in disguise.

-----