5 ms·
It's a funny joke (I love that post), but it's mostly for people looking from outside in. It says nothing about actually doing IO with Haskell using monads, whi
by the_af 3y ago
It's a funny joke (I love that post), but it's mostly for people looking from outside in. It says nothing about actually doing IO with Haskell using monads, which is practical and done, and not particularly difficult.
We shouldn't mistake memes for actual insight.
- tempodox 3y ago> and not particularly difficult. Wait until you want debug output in a deeply nested function that isn't already in the IO monad.
- jaspervdj 3y agoYou can use trace for that which is part of the base library: https://hackage.haskell.org/package/base-4.19.1.0/docs/Debug-Trace.html#v:trace https://hackage.haskell.org/package/base-4.19.1.0/docs/Debug...
- pyrale 3y agoUnrelated, but many thanks for organizing Zurihac year after year.
- the_af 3y agoDebugging output, or just plain debugging, is often difficult regardless of the programming language. I wouldn't say this sets Haskell apart.
- bazoom42 3y agoYeah as long as you understand how to use monads IO is easy. This is why Haskell tutorials tend to have 100 pages of dense type-theory before getting to “hello world”, while other languages have that on the first page.
- tome 3y agoI'm not sure which tutorials you're thinking of. Not this one I guess https://wiki.haskell.org/Haskell_in_5_steps#Write_your_first_Haskell_program https://wiki.haskell.org/Haskell_in_5_steps#Write_your_first... or this one https://riptutorial.com/haskell/example/898/hello--world- https://riptutorial.com/haskell/example/898/hello--world- Can you link to the one that has 100 pages before getting to “hello world”?
- bazoom42 3y agoLearn you a Haskell gets to Hello World at page 128.
- tome 3y agoYeah, but that's not because the first 127 pages are "dense type theory". It's because that's the first time it teaches about compiled programs rather than the REPL. Besides, "Hello world" also appears on page 14. https://learnyouahaskell.com/learnyouahaskell.pdf https://learnyouahaskell.com/learnyouahaskell.pdf
- the_af 3y agoThis is simply untrue. You can do IO without understanding what a monad is, simply taking it as "there is this keyword and this syntax I need to use". No Haskell tutorials that I know of take long to reach "hello world", which is in fact a shorter program in Haskell than in some mainstream programming languages.