LWN.net Logo

What, again?

What, again?

Posted May 2, 2007 7:52 UTC (Wed) by ms (subscriber, #41272)
In reply to: What, again? by peterh
Parent article: The Rise of Functional Languages (Linux Journal)

Most reasonable people would see some form of memory-safety as a non-negotiable language design goal.

Not only that, but after a few months with Haskell, I see the preservation of type information a design goal. Which means any language based on sequential composition is out.

   e1:t1  e2:t2
   ------------   (SEQ)
     e1;e2:t2

Agh! Seriously, Haskell is really lovely language for doing I/O work in. The strength of the type system is a massive gain. And is anyone really going to claim that currying, higher-order functions and first class functions are features you can do without?


(Log in to post comments)

What, again?

Posted May 12, 2007 7:15 UTC (Sat) by jwalden (guest, #41159) [Link]

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.

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