LWN.net Logo

Advertisement

Advanced thin client solution for Linux, based on Open Source. Mix Windows and Linux, 10 licenses for free!

Advertise here

FOSDEM 2009

What, again?

What, again?

Posted May 12, 2007 7:15 UTC (Sat) by jwalden (guest, #41159)
In reply to: What, again? by ms
Parent article: The Rise of Functional Languages (Linux Journal)

And is anyone really going to claim that currying [is a feature] you can do without?

Yes. The utility of currying depends heavily on how your libraries use higher-order functions. For an example from Standard ML, consider List.map mapFun lst; in code where you're using the same mapping function often enough, currying is a natural way to simplify the code. However, if the language doesn't support this in its libraries or if there's no syntactical support (JavaScript comes to mind as one such language), currying isn't that huge a win over just hardcoding the mapping function a bunch of places.

Don't get me wrong: currying is a very nice feature. However, in my experience its utility depends heavily on how the libraries you're working with make use of higher-order functions in their interfaces and on the syntax the language provides to use it.


(Log in to post comments)

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds