HNHacker News
TopNewBestAskShowJobs

BillMryes

7 karma · joined April 6, 2015

submissionscomments
BillMryes··on Learning Haskell as a non-programmer (2014)
To add to what rtpg says, if you look at an actual, monadic example of an IO:

  putStrLn "What is your name?"
    >> getLine >>= 
    \name -> putStrLn ("Hi, " ++ name ++ "!")
It's just a giant chain of instructions, each previous result feeding into the next. Nowhere do we assign anything, modify anything, etc. No mutation.
BillMryes··on Learning Haskell as a non-programmer (2014)
Even in non-Haskell, a lazy list is a obvious possibility for that. It's not for no reason that many languages have implemented map, reduce, filter; laziness can still be pretty efficient while increasing composability and readability.

Even Java has finally been dragged into the 1960s!

BillMryes··on Learning Haskell as a non-programmer (2014)
In the computer, you also have no descriptive variable names and make excessive use of gotos. This is far from a good argument.

> Haskell does support mutation, but inside of particular monads.

You are mistaken. Monads do not involve mutation; that would defeat their entire purpose. Although it's true that the monadic code is being compiled into assembly that involves mutation, just as $LANGUAGE code is being compiled into assembly that includes a lot of goto.