Hacker News new | past | comments | ask | show | jobs | submit login

A feature, in my opinion.

Well, Clojure's a different language so it doesn't matter as much. If Clojure had enforced purity and pervasive laziness (a la Haskell) it'd be a real pain to use monads without polymorphic operators for them.




You're assuming that Haskell's monadic approach is the ultimate approach to managing effects (which include delayed evaluation). Personally, I prefer the model in Eff [1] and proven as an alternative to monad transformers (although, still a single-layer monad in Haskell) [2]. Eff's approach utilizes capabilities [3], called "effect instances", to restrict access to effects. Much nicer, in my opinion. Hence, I've been experimenting with the ideas in Clojure [4].

[1]: http://math.andrej.com/eff/

[2]: http://lambda-the-ultimate.org/node/4786

[3]: http://erights.org/elib/capability/ode/ode-capabilities.html

[4]: https://github.com/brandonbloom/cleff


I don't know enough about the theory to argue either way. I just really like Haskell's monad libraries (as well as applicative functors and lenses). If you're able to build a library that's as general, flexible and powerful in Clojure I will be really excited!




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

Search: