News for hackers. Stuff that matters.
Re:Monads are a Class of Hard Drugs (2008) by brazzy on Saturday December 29, 2012 @04:52AM (#4981638)
So basically monads are like a Java object that has a private field and a getter method that has some extra logic. Hey, that's really simple, you're right!

duck & runl

Re:Monads are a Class of Hard Drugs (2008) by chongli on Saturday December 29, 2012 @07:19AM (#4981891)
No, objects in Java are more complicated than monads. They include the concepts of identity, mutable state and inheritance; all of which monads lack.
Re:Monads are a Class of Hard Drugs (2008) by tel on Saturday December 29, 2012 @11:53AM (#4982585)
Almost, it's more like an "applyer" method with some extra logic. You're never allowed to get "raw" values out, you can only pass functions inward to modify the value.

If you want to get the raw values out (and you almost always do) then you have to add some extra logic to the object above its "monadic" nature.

And yeah, it is really, really simple!