On Wed, Jan 25, 2012 at 8:20 PM, Toby Thain <toby at telegraphics.com.au> wrote:
>> * Learn You A Haskell For Great Good by
Lipovaca
>>
>> Okay, now if you want to be spoonfed Haskell and functional programming,
>> read this. ...
Hmm... I've _used_ code written in Haskell (an Infocom de-compiler)
but never been able to wrap my head around the tool I was handed.
This quote might help explain why...
http://book.realworldhaskell.org/read/why-functional-programming-why-haskel…
"Along with not modifying data, our Haskell functions usually don't
talk to the external world; we call these functions pure. We make a
strong distinction between pure code and the parts of our programs
that read or write files, communicate over network connections, or
make robot arms move"
Since I spend a lot of time reading and writing files and
communicating over networks and making robots move, I think Haskell is
*not* for me. Its "pure functions" are boring to me. I like to write
code that interacts with the real world.
And this quote really puts me off Haskell (and functional programming)...
"In Haskell, we de-emphasise code that modifies data. Instead, we
focus on functions that take immutable values as input and produce new
values as output. Given the same inputs, these functions always return
the same results. This is a core idea behind functional programming."
This, to me, sounds like the model of connecting processes with pipes
via a shell (a 40-year-old technique, FWIW). I already do that,
dozens of times a day. I don't need to do that at the code-block
level inside the same process.
I enjoyed the emergence of OOP into the world of FORTRAN and vanilla
C. I have found many, many things that make sense when represented as
objects (and plenty that were severely beaten into that mold, but
that's another thing). I have yet to be won over by the "benefits" of
functional programming as I'm hearing it evangelized. Perhaps that
makes me a curmudgeon, but I'm an employed and successful one, if so.
-ethan