My apology to those who don't care about
Java. Please trash this note.
I recently published two open source
Java projects that are based on the Monad computation model learned from
Haskell community.
1. A port for Parsec. This library is
called Jparsec. It implements monadic parser combinator in Java. Not nearly
as concise and clean because of the limitation of the Java language, but
it implements the same idea. And it looks like the only monadic parser
combinator lib in Java so far, according to my google homework. ;--)
url: http://docs.codehaus.org/display/JPARSEC/home
2. A light-weight Dependency Injection
container that's built around the Monad model.
If you see
<sequence id="mybean">
<bean var="a1" class="A1"/>
<bean var="a2" class="A2"/>
<method class="X"
name="create" args="$a1,$a2"/>
</sequence>
You'll know what I'm talking about ---
do-notation. With a bunch of "bind" calls under the hood, it
is equivalent as saying:
do
a1 = bean "A1"
a2 = bean "A2"
method "X" "create"
[a1,a2]
url: http://docs.codehaus.org/display/YAN/home
This is the only ioc container that
uses Monad model in Java.
Just FYI. Any comment is welcome.
Ben.