Jakarta Commons Monad, er, Chain

From Jakarta Commons Chain:
A popular technique for organizing the execution of complex processing flows is the "Chain of Responsibility" pattern, as described (among many other places) in the classic "Gang of Four" design patterns book. Although the fundamental API contracts required to implement this design patten are extremely simple, it is useful to have a base API that facilitates using the pattern, and (more importantly) encouraging composition of command implementations from multiple diverse sources. Towards that end, the Chain API models a computation as a series of "commands" that can be combined into a "chain".
Is it just me, or the Java world has discovered (an ad-hoc, informally-specified bug-ridden slow implementation of) monads?

On a serious side, it would be interesting to hear opinions of the developers.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

What's Next?

As if that weren't enough, we also have RIFE Continuations. Since that gives Java full continuations and Java already has mutable variables, that means Java is now open to both monads and delimited continuations. It will be interesting to see where, if anywhere, this goes.


Interesting connection!


Well, the OP was entirely tongue in cheek, mostly to demonstrate how imprecise is the usual prose of (marketing slogans of some) mainstream projects. I believe that Chain of Responsibility (in most of traditions) has more to do with reification of invocations, and some canonical forms of dispatch than with monads.

Sorry about misleading post.

[snipped pointless sarcasm]

[snipped pointless sarcasm]