
22 Dec
2005
22 Dec
'05
3:58 p.m.
So one of the big things in object oriented programming is encapsulation, and I'm wondering how to do it properly in Haskell. How do you define new data types but minimize the dependence of external packages on the exact nature of the data definition? Use modules. Don't expose the constructors.
Instead, just expose functions that implement the functionality users of your library will need: http://www.haskell.org/hawiki/AbstractDataType http://www.haskell.org/hawiki/AbstractDataTypes Jared. -- jupdike@gmail.com http://www.updike.org/~jared/ reverse ")-:"