elfs: (Default)
[personal profile] elfs
"Anyone trying to understand monads will inevitably run into Haskell’s IO monad, and the results are almost always the same: bewilderment, confusion, anger, and ultimately Perl."

Date: 2010-12-27 05:55 pm (UTC)
ext_58972: Mad! (Default)
From: [identity profile] autopope.livejournal.com
Guh ... buh ...

I'm unfamiliar with Scala, Ruby and Haskell; my reading of this is that a monad is basically a type conversion work-around for programming in a whips'n'bondage language that officially forbids type conversion. Am I on the right track here?

Date: 2010-12-27 06:20 pm (UTC)
From: [identity profile] elfs.livejournal.com
I'm still trying to figure out monads myself. The closest I've come to grokking them is that "monad" an abstract control flow description in the way that "class" is an abstract data type description. You concretize monads into specific control flow patterns, and then instantiate them into actual control flow operations, in the same way that you concretize the abstract notion of a class into an actual class, and then instantiate it into an object.

I suspect this in one of those ideas that I'll have to play with until it becomes boring, at which point the "Aha, I seem to have gotten it sometime in the past and am only now associating the term with it" will hit me. I never have "Eureka!" moments, just "There's a word for that?" ones.

Date: 2010-12-27 06:39 pm (UTC)
From: [identity profile] norikos-author.livejournal.com
Yes. Yes. This _exactly_ describes my experience.

Date: 2010-12-27 06:42 pm (UTC)
From: [identity profile] elfs.livejournal.com
It's not that monads themselves are complex, but that the implementation relies on many other advanced Haskell features like parameterized types, type classes, and so on. The problem is that Haskell IO is based on monads, and IO is probably one of the first things you want to understand when learning a new language - after all, its not much fun to create programs which doesn't produce any output. I have no immediate solution for this chicken-and-egg problem, except treating IO like "magic happens here" until you have enough experience with other parts of language. Sorry.
- Jim Ferrens on why Haskell is so damned hard to learn (http://stackoverflow.com/questions/44965/what-is-a-monad/194207#194207).

Date: 2010-12-27 07:16 pm (UTC)
From: [identity profile] delphanaeous.livejournal.com
That has to be a Larry Wall quote. :)
Edited Date: 2010-12-27 07:18 pm (UTC)

Date: 2010-12-27 10:12 pm (UTC)
From: [identity profile] en-ki.livejournal.com
Nonsense. I used C.

Date: 2010-12-28 10:44 am (UTC)
ext_58972: Mad! (Default)
From: [identity profile] autopope.livejournal.com
Oh, one of those.

(I am having a flashback to how long it took me to truly grok pointers and indirection. Ouch. I think I shall leave Haskell alone. After all, I don't program for a living any more and I've got a to-do list the length of my arm ...)

Profile

elfs: (Default)
Elf Sternberg

December 2025

S M T W T F S
 12345 6
78910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 31st, 2025 05:54 am
Powered by Dreamwidth Studios