Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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


Recursion 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.


Guy Belloch's talk on Parallel Thinking at PPoPP09: 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/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.)


Exactly what I was trying to say. BTW you should update your formatting a little bit.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: