From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: pasquere@aar.alcatel-alsthom.fr (Benoit Pasquereau)
Cc: caml-list@inria.fr
Subject: Re: local type within class
Date: Wed, 12 Nov 1997 11:05:11 +0100 (MET) [thread overview]
Message-ID: <199711121005.LAA29754@pauillac.inria.fr> (raw)
In-Reply-To: <3462F8B3.D1E@aar.alcatel-alsthom.fr> from Benoit Pasquereau at "Nov 7, 97 12:17:07 pm"
> I would like to define "types" that are in the namescope of classes, is
> it possibles in ocaml ? (just like local types in C++)
Namespace control in Caml is performed by the module system. Your
type belongs to a module (either the current compilation unit or some
sub-structure). To hide this type, just add an interface to this module
that does not specify this type.
Objective Caml classes are only intended as a mechanism to group sets
of methods, attach them to objects, and perform inheritance. Unlike
in C++ or Java, classes in Objective Caml do not double as a
general-purpose namespace control structure.
- Xavier Leroy
prev parent reply other threads:[~1997-11-12 14:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-11-07 11:17 Benoit Pasquereau
1997-11-12 10:05 ` Xavier Leroy [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=199711121005.LAA29754@pauillac.inria.fr \
--to=xavier.leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=pasquere@aar.alcatel-alsthom.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