From: james woodyatt <jhw@wetware.com>
To: tim@fungible.com (Tim Freeman)
Cc: The Trade <caml-list@inria.fr>
Subject: Re: [Caml-list] Allow declaring classes "final" so self type has no type variables?
Date: Fri, 6 Sep 2002 13:18:17 -0700 [thread overview]
Message-ID: <C79C09FF-C1D5-11D6-8D7B-000393BA7EBA@wetware.com> (raw)
In-Reply-To: <20020906192333.1663A7F9A@lobus.fungible.com>
On Friday, Sep 6, 2002, at 12:12 US/Pacific, Tim Freeman wrote:
>
> Any comments on whether this is a good idea?
Hide the class with a module signature. Publish only the class type
and one or more functions for constructing objects.
In other words, don't put your "class node" in the module type.
Instead just define a function:
val create_node: parent:nodetype option -> nodetype
The way to prevent programmers from using your class in an "inherit"
clause is to not give them the class in the first place. Just give
them the class type and a collection of functions.
--
j h woodyatt <jhw@wetware.com>
markets are only free to the people who own them.
-------------------
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
next prev parent reply other threads:[~2002-09-06 20:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-06 19:12 Tim Freeman
2002-09-06 20:18 ` james woodyatt [this message]
2002-09-06 20:38 ` Alessandro Baretta
2002-09-06 21:15 ` james woodyatt
2002-09-11 0:16 ` Tim Freeman
2002-09-11 5:09 ` james woodyatt
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=C79C09FF-C1D5-11D6-8D7B-000393BA7EBA@wetware.com \
--to=jhw@wetware.com \
--cc=caml-list@inria.fr \
--cc=tim@fungible.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