4 ms·
Early functional languages were based on two basic constructs: *Linked lists (cons-cells) for data structures *Recursion (with or without TCO) for control
by nivertech 16y ago
Early functional languages were based on two basic constructs:
*Linked lists (cons-cells) for data structures
*Recursion (with or without TCO) for control flow
Both of these concepts are fundamentally sequential and not less important very low level.
For today's manycore/parallel/distributed world, better fit would be:
*Nested data-parallel types (like in NESL or Intel ArBB)
*HOFs, array/dictionary/parallel comprehensions
- tianyicui 16y agoExactly what I was trying to say. BTW you should update your formatting a little bit.
- scott_s 16y agoGuy Belloch's talk on Parallel Thinking at PPoPP09: http://www.cs.cmu.edu/~guyb/papers/PPoPP09.pdf http://www.cs.cmu.edu/~guyb/papers/PPoPP09.pdf Guy Steele's talk on Breaking Sequential Habits of Thought: http://groups.csail.mit.edu/mac/users/gjs/6.945/readings/MITApril2009Steele.pdf http://groups.csail.mit.edu/mac/users/gjs/6.945/readings/MIT... I suspect you're already familiar with these since you cite NESL, but they're worth linking anyway. (Also, I've always had these talks linked in my mind, but I just realized they're both named Guy. Odd.)
- eru 16y agoRecursion is not fundamentally sequential. It depends on your data structures: Structural recursion on sequential data structures is sequential. Structural recursion on somewhat-balanced tree-like data structures is more amenable to parallelism. (And non-structural recursion is too general to talk here.) Though I agree that using recursion does not scale very well in terms of program complexity. Hide your data flow behind combinators, if you don't want to get a headache. I highly recommend Guy Steele's talk that's linked in a sibling comment. I am glad I attended ICFP that year.