[Haskell] Object-Orientation and Haskell

2005-09-24 Thread Ashley Yakeley
Here's a simple test for object orientation (for some reasonable definition): Define a type A such that for any type B you can define up :: B - A down :: A - Maybe B such that down . up = Just You can do this quite easily in Java or C++, mutatis mutandis. You can't do this

RE: [Haskell] Object-Orientation and Haskell

2005-09-24 Thread Ralf Lammel
Define a type A such that for any type B you can define up :: B - A down :: A - Maybe B such that down . up = Just You can do this quite easily in Java or C++, mutatis mutandis. You can't do this in Haskell, I don't think. You can't actually do this in O'Haskell