caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: John Prevost <j.prevost@gmail.com>
To: "chris.danx" <chris.danx@ntlworld.com>
Cc: Caml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Restricting Method Overriding/Redefinition in Subclass
Date: Wed, 18 Aug 2004 15:47:09 -0400	[thread overview]
Message-ID: <d849ad2a0408181247313da9f0@mail.gmail.com> (raw)
In-Reply-To: <412345DC.5050206@ntlworld.com>

On Wed, 18 Aug 2004 13:04:44 +0100, chris.danx <chris.danx@ntlworld.com> wrote:
> > 2) Subclasses that are not subtypes
> 
> The first one is easy to understand, but the second example took a while
> to get my head around.  I think I understand the implications of it now,
> although it is still a bit unclear to me how the reuse works in this
> example.  I sort of understand it, but bits of it are unclear.  Need to
> think about it for a while.

Well, to be honest, the example is not a very good example.  With the
linked lists and doubly linked lists, the amount of code that is
re-used is pretty small compared to the amount of work that needs to
be done to re-use it.  Try looking at the section on binary methods in
the OCaml manual (Section 3.16) for a much much simpler example of a
subclass that is not a subtype.

Both section 3 and section 5 of the manual are very very good things
to read to get a handle on this object system.

John.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2004-08-18 19:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-14  0:03 chris.danx
2004-08-14  7:38 ` skaller
2004-08-14 16:28   ` John Prevost
2004-08-14 17:17     ` skaller
2004-08-18 12:04     ` chris.danx
2004-08-18 19:47       ` John Prevost [this message]
2004-08-18 22:21       ` skaller
2004-08-16  4:58 Jeff Schultz

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=d849ad2a0408181247313da9f0@mail.gmail.com \
    --to=j.prevost@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=chris.danx@ntlworld.com \
    /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).