>> type Point = (Int, Int)

> 2. using "type" (instead of "data") is generally a bad idea.

and in this case, using "data Point ..." would allow to
define a "smart constructor" that can at least check at run-time
whether the bounds are met. - J.W.



Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to