Message-Id: <36E8F0A4.A7EE895@dassault-aviation.fr>
Date: Fri, 12 Mar 1999 11:47:01 +0100
From: Thierry Bravier <Thierry.Bravier@dassault-aviation.fr>
To: Andrew Martin <amartin@ibmoto.com>, caml-list <caml-list@inria.fr>
Subject: Re: CamlIDL - stub code generator and COM binding for OCaml
Andrew Martin wrote:
> How about the following change to the Ocaml language with two orthogonal
> extensions to the use of the "open" keyword:
>
> 1) allow open to be used locally (open M in (f a b c)) and
> 2) allow open t where t is a type expression as well as open M where M is a
> module expression (open t in expr)
Both extensions look really neat to me.
They should solve the common record label issue (as explained by A. Martin)
and also another seemingly unrelated problem:
(see Christophe Raffalli's last message)
how to use A.B.(+) in an infix way ?
With 'open in' you could write:
module F = struct let (+) = (+.) and (-) = (-.) and ( * ) = ( *. ) end
let delta a b c = open F in b*b - 4.0 *a*c
without 'open in' you would not be able to 'open F'
because it would hide useful Pervalises.(+) ... till the end of current struct
(most often current file).
Thanks.
--Thierry Bravier Dassault Aviation - DGT / DPR / DESA
78, Quai Marcel Dassault F-92214 Saint-Cloud Cedex - France
Telephone : (33) 01 47 11 53 07 Telecopie : (33) 01 47 11 52 83
E-Mail : mailto:thierry.bravier@dassault-aviation.fr
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:21 MET