Re:Why Haskell is suited to IO
by mitchellh on Monday July 04, 2011 @01:21PM
(#2727118)
Oh, no no. Pure is not required for functional programming. Functional programming is mostly defined as the ability to pass around functions as 1st class data types. In fact, I noticed on your GitHub you do some Python. Here is functional programming in Python:
Pure is a stricter form of functional programming, which Haskell enforces.
You're stepping now into the "lazy" aspect of Haskell. You're allowed to have infinite recursion in Haskell because it is only evaluated when needed. I don't really want to get into it here since there are many resources online about it :) But this also isn't inherent to functional programming or pure function programming.
[ Parent
| on HN ]
Re:Why Haskell is suited to IO
by mattdeboard on Monday July 04, 2011 @01:48PM
(#2727221)
Interesting, thanks for taking the time for in-depth explanations.
Also you don't need to use recursion too much, when writing Haskell code. You should stick to using combinators over your (recursive) data-structures. Think fold, map, filter, and friends.
Alas, you still have to be able to understand recursion to get anywhere.