
31 Jan
2001
31 Jan
'01
2:31 a.m.
At 2001-01-30 23:11, Johan Nordlander wrote:
However, this whole idea gets forfeited if it's possible to look behind the abstraction barrier by pattern-matching on the representation.
Isn't this information-hiding more appropriately achieved by hiding the constructor? -- data IntOrChar = MkInt Int | MkChar Char data Any = forall a. MkAny a -- Surely simply hiding MkInt, MkChar and MkAny prevents peeking? -- Ashley Yakeley, Seattle WA