From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL,HTML_MESSAGE, MIME_HTML_ONLY autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id A8C68BC69 for ; Thu, 18 Oct 2007 16:58:54 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAIkRF0fQccgFfWdsb2JhbACCPDaKOoEhAgkEBgIPEQeBJw X-IronPort-AV: E=Sophos;i="4.21,295,1188770400"; d="scan'208,217";a="18219872" Received: from lax-green-bigip-5.dreamhost.com (HELO looneymail-a5.g.dreamhost.com) ([208.113.200.5]) by mail4-smtp-sop.national.inria.fr with ESMTP; 18 Oct 2007 16:58:53 +0200 Received: from carols-computer-3.local (unknown [74.202.102.226]) by looneymail-a5.g.dreamhost.com (Postfix) with ESMTP id 67095122D31; Thu, 18 Oct 2007 07:58:50 -0700 (PDT) Message-ID: <471774AA.5000109@fischerventure.com> Date: Thu, 18 Oct 2007 09:58:50 -0500 From: Robert Fischer User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Dario Teixeira Cc: Stefano Zacchiroli , caml-list@yquem.inria.fr Subject: Re: [Caml-list] Smells like duck-typing References: <377673.31302.qm@web54602.mail.re2.yahoo.com> In-Reply-To: <377673.31302.qm@web54602.mail.re2.yahoo.com> Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; conceptually:01 conceptually:01 subtype:01 caml-list:01 standpoint:01 formalism:01 formalism:01 precisely:01 data:02 defined:02 seems:03 inheritance:03 inheritance:03 let:03 root:04
That seems backwards from the way OO inheritance is supposed to work.  
You don't go from a more feature-rich case to a less feature-rich case 
-- it's the other way around.
    

Of course it is -- that is precisely why inheritance is the wrong
formalism for my problem!  What I need is a "reverse inheritance"
formalism, where a fully defined data structure sits at the root,
and whose descendants are PRUNED versions of the parent.
  
Mind showing me, formally, why you need "reverse inheritance"?

Conceptually, you just need to fix your choice of names.  Let me cite the second paragraph of the e-mail you're responding to (which you neglected in your response):

>  If you s/blurb/header/g or s/blurb/summary/g, then a Full story arguably is-a blurb with a body tacked on.

If you think that a full story as a story with a summary/header, and also a body, then you're conceptually into inheritance.

>>From a formal standpoint, you're saying that all full stories can be treated as headers/summaries/"blurbs", but not all headers/summary/"blurbs" can be treated as full stories.  This is equivalent to saying that full stories are a subtype of header/summaries/"blurbs".

You are right smack dab onto the problem space that inheritance is designed to solve.

~~ Robert.