
5 Nov
2009
5 Nov
'09
7:10 a.m.
Shelby Moore wrote:
In Haskel, subtyping is done with Module...
data is analogous to a public class members. Use Module to make some implementation private:
http://www.cs.auckland.ac.nz/references/haskell/haskell-intro-html/modules.h...
Thus use type classes (interfaces) when consuming the public Module interfaces in functions (i.e. only consume the exported Module interfaces in the sense they implement a type class, never directly consume the Module name space).
A strong argument against hiding internal functionality of an ADT (against using Module), and favoring fully composable functional programming (i.e Haskell without Module) for GUIs: http://lambda-the-ultimate.org/node/3668#comment-51993 (concise and sweet)