Hacker News new | ask | show | jobs
by louthy 4353 days ago
"Computation is not just about functions, if computation was just about functions then quicksort and bubblesort would be the same because they're computing the same function. A computing device is something that goes through a sequence of states. What an assignment statement is doing is it is telling you "here is a new state". Functions alone don't solve the problems of programming because programs (on the whole) are non-deterministic; on the other hand, imperative programs are using assignment statements to compute functions, and that's silly."

That exact phrase was said to Erik Meijer by Leslie Lamport when Erik interviewed Leslie. [1]

It seems clear (if you take Leslie's word as gospel) that there is room for 'Mostly Functional'. That is, accept that your program goes through a series of states, but use pure functions to calculate those states.

However, as an imperative programmer who's found Haskell over the past few years (thanks, in a large part to Erik Meijer), I happen to think that Haskell has it just about right.

[1] http://channel9.msdn.com/Shows/Going+Deep/E2E-Erik-Meijer-an...