I'm looking for some insight into the relationship between Monads and 
Middleware.

It seems to me that middleware (ala Ring, Boot) is really just a subset of 
Monads, where bind and lift are globally agreed upon conventions, rather 
than explicitly defined.  For example, with middleware you need every 
function to accept and return the same signature so as to be composable, 
whereas with monads you explicitly provide the code for binding and lifting 
into and out of the monad world.

My basic questions are:

1.) Is middleware really a monad with a different name?
2.) Is there any compelling reason to use monads in clojure instead of 
middleware?
3.) Are there classes of problems that can be solved with monads that can't 
be solved with middleware?
4.) Is there any benefit (beyond curiosity) to porting/re-implementing 
middleware as monads?

Thanks.

Scott Klarenbach
www.invisiblerobot.io


-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to