Re:Portacle – A Portable Common Lisp Development Environment
by kazinator on Friday January 06, 2017 @06:27PM
(#13341271)
Another consideration/angle is this. Suppose I call a three-arg function with only two args. Why should that curry in the Haskell way? That is just someone's design opinion. Suppose I want that two-arg call to return a function, but not the ordinary curried one. For instance, I might want the function to curry to a transduce kernel. Meaning, I can pass the resulting function to reduce, such that the reduce now performs a mapping through the original function. In other words, this:
(map (lambda (x) (foo 1 2 x)) list) <--> (reduce (foo 1 2) list)
In mainstream languages that have implicit currying, we're stuck with the one and only currying semantics.
Most Lisps show off inbuilt functions that have side effects, such as setf in CL or set! in Scheme.
Magic with side effects tends to be looked down on in the community, because it changes an incredibly simple syntax that is just about self-describing to one that has cognitive load in differing circumstances.
Take pity on whoever has to come after you.
My point was merely to show that it is possible.
It should be also possible to add implicit currying, by messing with a read macro, but I would ask that you don't.