RE: Undefined labels

From: David Brown (caml-list@davidb.org)
Date: Thu Nov 18 1999 - 21:08:32 MET


Date: Thu, 18 Nov 1999 12:08:32 -0800 (PST)
To: caml-list@inria.fr
Subject: RE: Undefined labels
In-Reply-To: <199911171001.LAA26208@yana.inria.fr>
 <199911171001.LAA26208@yana.inria.fr>
From: David Brown <caml-list@davidb.org>

Gerard Huet writes:
> open is a facility that is convenient to the programmer because the code is
> uncluttered with long explicit names, but it is of course a source of bugs.
> The addition of a new binding in a module may change drastically the
> semantics of modules which open it, in a way that stays unnoticed if types
> match.

One feature I like of Python and Erlang is a selective import. It is
possible to specify only the items that you would like imported from a
module. If you use the selective open, the open declaration itself
states which symbols come from that module. Since the scope is
explicit, it makes it easy to tell where something is coming from.

I'm not familiar with the parser too much, but perhaps something like:

open (bleep, bloop, SubMod) Module;;

There probably should also be a way to open all of the constructors of
a type.

Dave Brown



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:28 MET