
25 Nov
2009
25 Nov
'09
4:08 p.m.
Michael Mossey wrote:
I'm fairly new to Haskell, and starting to write some big projects. Previously I used OO exclusively, mostly Python. I really miss the "namespace" capabilities... a class can have a lot of generic method names which may be identical for several different classes because there is no ambiguity.
In my musical application, many "objects" (or in Haskell, data) have a time associated with them. In Python I would have an accessor function called "time" in every class.
This is what Type Classes in Haskell are for. See: http://www.haskell.org/tutorial/classes.html Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/