Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> signs you're too good of a programmer - > you use monads in object-oriented languages (like Python)

Are monads a natural fit to Python, or is this a case of "when all you've got is a hammer"...?



Python borrows list comprehensions from Haskell, but the syntax is used in a less powerful way. I wouldn't want to use non-builtin monads in a language without a compile-time type system (one of the usual advantages of monads is they save you a lot of effort testing, but this wouldn't be true in Python), but there's no reason you couldn't.

(If you want an object-oriented language with proper monads then use Scala)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: