3 ms·
It's a valid question and I am looking forward to the answer. The author claims we should use monads in Python code. However, he leaves the explanation for ano
by agentultra 16y ago
It's a valid question and I am looking forward to the answer.
The author claims we should use monads in Python code. However, he leaves the explanation for another day. Hopefully it will be quite enlightening.
I can't really see what Monads offer that Python is already well equipped to handle. We have weak-typing and exceptions. These are tools enough to call a function who may give us a random value of any type and we go off and start using it. If something blows up, we beg for forgiveness and can even try again... or whatever we need to do.
Then again, perhaps I'm missing the point as well.
- gxti 16y agoThe post is from 2008, and this seems to be the follow-up: http://www.valuedlessons.com/2008/02/pysec-monadic-combinatoric-parsing-in.html http://www.valuedlessons.com/2008/02/pysec-monadic-combinato...
- jedbrown 16y agoI like parser combinators, this library is currently my favorite. Pysec is referenced at the bottom of the page. http://code.google.com/p/funcparserlib/ http://code.google.com/p/funcparserlib/
- agentultra 16y agoAh thanks. Hadn't finished my morning coffee. ;)