5 ms·
> Do I need to know Haskell? Yes. This is enough for me to reject this blogpost. No you don't need a specific language to implement any functionality that can
by fizixer 11y ago
> Do I need to know Haskell? Yes.
This is enough for me to reject this blogpost.
No you don't need a specific language to implement any functionality that can be implemented by a turing-complete language.
I watched Crockford's monad talk [1]. He used javascript. The only problem with that talk is that he spent about 10 seconds or less explaining what a monad is (and the rest of the talk on implementation issues and his own perspective, etc, etc).
I'm still waiting for a good monad discussion without CT or Haskell. (this [2] and this [3] look promising, both in python)
[1] https://www.youtube.com/watch?v=b0EF0VTs9Dc https://www.youtube.com/watch?v=b0EF0VTs9Dc
[2] http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html#6799472260664409462 http://www.valuedlessons.com/2008/01/monads-in-python-with-n...
[3] http://www.dustingetz.com/2012/04/07/dustins-awesome-monad-tutorial-for-humans-in-python.html http://www.dustingetz.com/2012/04/07/dustins-awesome-monad-t...
- rntz 11y agoIt's true that you don't need to know Haskell in order to learn about monads, but Haskell is a perfectly reasonable language in which to write a monad introduction. Haskell is good for learning about monads for the same reasons monads tend to be heavily used in Haskell, but not in other languages. Monads are both part of Haskell's standard library, and have very useful special syntax (do-notation). Writing out monadic code explicitly gets to be a huge pain when using monads in another language. Typeclasses also make it convenient & easy to write code that's generic over any monad.
- imh 11y ago>Writing out monadic code explicitly gets to be a huge pain when using monads in another language. Couldn't any other language have a syntax like thing.do(\x -> other thing(x)).do( \x -> yet another thing(x)).do( a function).do( more stuff).do( etc) And then replace "\x -> whatever" with the local language's lambda syntax. The only time you get the painful nested parens is if you want thing.do( \x -> f(x).do( \y -> g(x,y))) It's not too terribly bad.
- ash 11y agoLike JavaScript Promises?
- banku_brougham 11y agoDude, fine. But the author wrote the tutorial with those assumptions, he's just trying to help you out bro!
- jimbokun 11y agoYou need to know Haskell to complete the exercises, not to understand Monads.
- 88e282102ae2e5b 11y agoThat may be true in principle, but I have been unable to find any resource ever that explains them well. Presumably this is because I don't know Haskell and the only good explanations are in that language.
- mightybyte 11y agoHi, I'm sorry you feel that way. Maybe you just aren't my target audience. That being said, Crockford's explanation of monads in that talk was overly simplistic and misses much of the point of the benefit that you get from them in a language like Haskell. And if we're being honest here I think it's safe to say that most programmers wouldn't have even heard of monads if it wasn't for Haskell. I gave a talk at the NY Haskell meetup a few years ago that specifically addresses Crockford's talk in a little more detail [1]. That talk might be about the level you're looking for. There is some Haskell code, but most of the talk should make sense to someone not familiar with Haskell. [1] https://vimeo.com/59215336 https://vimeo.com/59215336