ext_83566 ([identity profile] pozorvlak.livejournal.com) wrote in [personal profile] pozorvlak 2006-12-05 06:22 pm (UTC)

More generally: the duck-typing approach could be seen as something like implicit declaration of all possible type classes and instances. So if we needed a function to be able to call show and +, we don't need to declare a new typeclass ShowAndPlus, and go around declaring hundreds of things to be members of this class (and recall that we can't simply say instance (Show a, Num a) => ShowAndPlus a).

Hmmmm. It ought to be possible to do a lot of that at compile-time...

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting