
On Fri, Aug 6, 2010 at 11:17 AM, aditya siram
I'm still a little iffy on why the monad concept isn't used in other languages.
The greatest feat that monads have accomplished, in my opinion, is providing the right mathematical abstraction for declaring side-effect and stateful computation in a pure functional language. For the first time it was now possible for a pure functional programming language to be a general purpose programming language. That's was quite an accomplishment! The second most important feat of monads was their close offspring, the monad transformers. These guys gave pure functional programmers the ability to maintain invariants on which side-effect/stateful computations their end users are going to use. This enhanced verifiability by a measured mix of pure and impure. The other languages that you mention are impure. So feat #1 is pointless since they were already general purpose without monads, and feat #2 is not realistically achievable since impure languages generally don't have a way of restricting a function from having arbitrary side-effects. There have been some clever things done with monads aside from #1 and #2. Parsec is one, but it seems applicative functors are a better match for the parsing domain. Other things are "neat", but not killer features that would turn the head of a pragmatist of the impure type in my opinion. So, that is why I think the monad concept isn't generally used in other languages. David -- David Sankel Sankel Software www.sankelsoftware.com 585 617 4748 (Office)