Patrick Browne :

> For example, if the class Bird has a flying method can we represent Penguins
> as a sub-class of Bird without a flying method?

The silliest - from the pedagogical perspective - answer to any question, is "you don't need it".
But ... in most cases you really don't need it...

When instancing your Bird class you may "forget" to define the flying methods.
Is this unsuitable for you? The compiler will yell, but this is harmless.

Jerzy Karczmarczuk


PS. Penguins DO fly.
http://www.telegraph.co.uk/news/worldnews/1583517/Flying-penguins-found-by-BBC-programme.html

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to