On Friday 16 January 2009 15:18:50 Kuba Ober wrote: > So, when correctly applied, what's so disturbing about inheritance?
Inheritance is disturbing because, in general, it cannot be applied correctly. That is why there are so many workarounds, many of which do not even exist in C++ like final methods, sealed classes, multimethods, extractors and so on. OO is not good in all circumstances and other tools can be preferable. IME, OO is only very rarely the best solution and it is only chosen so often because it is typically the only solution available (e.g. in C++ or Java). > You inherit only where it makes sense, and if it makes sense then you don't > care about which particular method is called: it's supposed to be safe. Safety is quite different from easy of use, of course. -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs