caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christian RINDERKNECHT <rinderkn@hugo.int-evry.fr>
To: Jerome Vouillon <Jerome.Vouillon@inria.fr>
Cc: caml-list@inria.fr
Subject: Re: [Q] Four micro-questions on objects and modules.
Date: Sun, 7 Nov 1999 11:37:12 +0100	[thread overview]
Message-ID: <19991107113712.B5760@hugo.int-evry.fr> (raw)
In-Reply-To: <19991103224029.11296@pauillac.inria.fr>; from Jerome Vouillon on Wed, Nov 03, 1999 at 10:40:29PM +0100

Hello,

> >  3) Would it be possible to allow the "include" feature in class
> >     types? 
> 
> What do you mean ? A class type can inherit from another class type :
>    class type c = object method m : int end
>    class type d = object inherit c method n : bool end

Okay. This is exactly what I was asking for. But... now I am a little
bit confused since I was used to think that inheritance was a concept
that applies to classes, and (sub)typing to class types. Could you
explain? (Please note I am new to these topics...)

It may be not related, but the toplevel does not print out the "inherit"
construct after the typing of the classes:

        Objective Caml version 2.02

# class x =                        
    object
      method m = ()
    end
  ;;
class x : object method m : unit end
# class y =
    object
      inherit x  
      method n = ()
    end
  ;;
class y : object method m : unit method n : unit end
                 ^^^^^^^^^^^^^^^
                 No "inherit x" used instead here...


Best regards,

-- 

Christian

-----------------------------------------------------------------------
Christian Rinderknecht                     Phone +33 (0)1 60 76 44 43
Institut National des Télécommunications   Fax   +33 (0)1 60 76 47 11
Département Logiciels Réseaux (LOR)        WWW
9, Rue Charles Fourier, F-91011 Évry Cedex



      reply	other threads:[~1999-11-07 21:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-02 13:09 Christian RINDERKNECHT
1999-11-03 21:40 ` Jerome Vouillon
1999-11-07 10:37   ` Christian RINDERKNECHT [this message]

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=19991107113712.B5760@hugo.int-evry.fr \
    --to=rinderkn@hugo.int-evry.fr \
    --cc=Jerome.Vouillon@inria.fr \
    --cc=caml-list@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).