caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Kuba Ober <ober.14@osu.edu>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] C++/C# inheritance is bad?
Date: Fri, 16 Jan 2009 16:42:36 -0500	[thread overview]
Message-ID: <CE0732F1-482C-49B0-9921-1C0F469B0FFB@osu.edu> (raw)
In-Reply-To: <91a2ba3e0901161027x5432afcbh504b4ca3df501851@mail.gmail.com>


On Jan 16, 2009, at 1:27 PM, Raoul Duke wrote:

>> the Liskov's substitution principle was violated. I have violated  
>> it myself
>> ...
>> So, when correctly applied, what's so disturbing about inheritance?  
>> You
>
> i like these food-for-thought / throw-gasoline-on-the-fire articles
> about the general subject:
>
> http://alistair.cockburn.us/Constructive+deconstruction+of+subtyping

Good paper, but doesn't directly address the issue of good practice in  
C++-like
languages.

> http://www.dbdebunk.com/page/page/626998.htm

This is a great discussion, but it's purely theoretical. The author  
simply
says that OO model as implemented in C++ is quite deficient and a good
OO implementation should not have its drawbacks. Fine and dandy, but
when you *do* use C++/Java/C#, that's what you've got, and if you try
to abuse it, you deserve what you get ;)

I basically still hold that Yaron's original objection is baseless in  
face
of established good OO practice in C++/Java/C#/...

I do understand the limitations of the popular OO model, of course, and
the benefits of Jane Street choosing OCaml. I was merely trying to
understand what I don't understand about the popular OO model that
would have Yaron complain about not being able to tell which exact
method is being called... It, somehow, is not an issue for me, not in
well designed C++ codebases at least.

Cheers, Kuba


  reply	other threads:[~2009-01-16 21:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-16 15:18 Kuba Ober
2009-01-16 15:58 ` [Caml-list] " Richard Jones
2009-01-16 16:28   ` On the benefits of OO, Was: " Jan Kybic
2009-01-17 12:40     ` Oliver Bandel
2009-01-16 18:27 ` Raoul Duke
2009-01-16 21:42   ` Kuba Ober [this message]
2009-01-17  3:14     ` Sashan Govender
2009-01-17 14:07       ` Kuba Ober
2009-01-18  6:24         ` Stefano Zacchiroli
2009-01-17 13:27 ` Jon Harrop
2009-01-17 14:35   ` Kuba Ober
2009-01-17 16:59     ` Jon Harrop
2009-01-17 21:22       ` Kuba Ober
2009-01-17 22:17         ` Jon Harrop
2009-01-17 23:29           ` David Teller
2009-01-17 23:49             ` Jon Harrop
2009-01-19 16:22       ` Visitor in OCaml [was Re: [Caml-list] C++/C# inheritance is bad?] Yoann Padioleau
2009-01-19 16:41         ` blue storm
2009-01-19 17:49           ` Richard Jones
2009-01-19 17:52           ` Visitor in OCaml Christophe TROESTLER
2009-01-21 20:09           ` Yoann Padioleau
2009-01-22  4:03             ` [Caml-list] " Yaron Minsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CE0732F1-482C-49B0-9921-1C0F469B0FFB@osu.edu \
    --to=ober.14@osu.edu \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).