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

You need monads to do any IO, that's not an easy first lesson. And you are a great distance from hardware.


    main = print "Hello, World!"
Not a monad in sight. Yes, print is an IO Action, but you don't have to use monads to do IO. Add in 'interact' and a you can be writing trivial stdin / stdout programs very quickly.


The first point is not too much of a downer, actually: it's not much harder to learn the IO monad as pure syntactic sugar than to learn printf and its ilk.




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

Search: