[Haskell-cafe] Monad applied in Java

2005-12-09 Thread Ben . Yu
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

Re: [Haskell-cafe] Haskell's overlooked object system: was OO idioms redux

2004-10-15 Thread Ben . Yu
Looks like my worry is pointless. :-> I was just afraid that Haskell may pick up another object monster. (And I'm a C++/Java programmer) Although I still miss a simple primitive language construct to do 'extensible record', it is definitely a nice work both theoretically and practically to present

Re: [Haskell-cafe] Haskell's overlooked object system: was OO idioms redux

2004-10-13 Thread Ben . Yu
>Why do you (or do these people) think having all the OO idioms of OCaml >(see OCamls OO tutorial) is useless? Or do you mean too baroque? If not, >what's missing? Because it does not give us much that we cannot do nicely with the current functional part. separate name space of course. But i

Re: [Haskell-cafe] Haskell's overlooked object system: was OO idioms redux

2004-10-13 Thread Ben . Yu
Some people say that ocaml's object system is kinda useless. The best support I hear so far was:"it does not hurt" implementation inheritance, the strange "#" syntax, virtual method, why do I need them? In Java, people are doing programming-against-interface, implementation injection etc. All the

Re: [Haskell-cafe] OO idioms redux

2004-10-13 Thread Ben . Yu
The only problem with this is "name". It is too easy to have naming clash in haskell. Field selectors are also top-level functions and they shared the same namespace with other functions. for any reasonable scale program, we'll end up with ModuleA.read x, ModuleB.read b. (Yes, we can alias the mod

Re: [Haskell-cafe] Rethinking OO idioms

2004-09-29 Thread Ben . Yu
You can use state monad to mimic mutation. Also, take a look at the recursive decent monadic parsec library. It may have done what you are trying to do. Regards, Ben.