20 Oct
2001
20 Oct
'01
4:38 a.m.
At 2001-10-19 08:02, George Russell wrote:
a naive user (like me a month ago) might expect that this to work, so that toBool (WrappedA a) (WrappedB b) will return False unless a is an A1, and b a B1, in which case it returns True.
I think existential types are arranged so that Haskell never needs to store type information in them at run-time. So you'll never be able to do dynamic OOP with them. One possible extension to Haskell for dynamic OOP, which I never tire of suggesting, is the extensible datatype, for instance: module P data BaseType = B1 | B2 | _ module Q data DerivedType = D1 | D2 data BaseType |= BD DerivedType -- Ashley Yakeley, Seattle WA
8847
Age (days ago)
8847
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ashley Yakeley