From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA20956 for caml-redistribution; Fri, 12 Mar 1999 18:07:47 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA09852 for ; Fri, 12 Mar 1999 11:42:02 +0100 (MET) Received: from relay2.eunet.fr (relay2.eunet.fr [192.134.192.149]) by nez-perce.inria.fr (8.8.7/8.8.7) with SMTP id LAA23800 for ; Fri, 12 Mar 1999 11:41:59 +0100 (MET) Received: from relay5.eunet.fr by relay2.eunet.fr (5.65c8d/96.05.03) via EUnet-France id AA09876; Fri, 12 Mar 1999 11:41:45 +0100 (MET) Received: from relay2.eunet.fr (relay2.eunet.fr [192.134.192.149]) by relay5.eunet.fr (8.8.5/8.8.5) with ESMTP id LAA20689; Fri, 12 Mar 1999 11:42:12 +0100 (MET) Received: from dassav (dassav.dassault-aviation.fr [193.106.72.131]) by relay2.eunet.fr (8.8.5/8.8.5) with SMTP id LAA09854; Fri, 12 Mar 1999 11:41:43 +0100 (MET) Received: from fnet-ia1.dassault-aviation.fr by dassav (5.x/SMI-SVR4) id AA02860; Fri, 12 Mar 1999 11:33:13 +0100 Received: from dassault-aviation.fr by fnet-ia1.dassault-aviation.fr (SMI-8.6/SMI-SVR4) id LAA10775; Fri, 12 Mar 1999 11:47:01 +0100 Sender: weis Message-Id: <36E8F0A4.A7EE895@dassault-aviation.fr> Date: Fri, 12 Mar 1999 11:47:01 +0100 From: Thierry Bravier Organization: Dassault Aviation X-Mailer: Mozilla 4.08 [en] (X11; I; SunOS 5.5.1 sun4m) Mime-Version: 1.0 To: Andrew Martin , caml-list Subject: Re: CamlIDL - stub code generator and COM binding for OCaml References: <19990305114159.01952@pauillac.inria.fr> <36E042AB.32801982@ibmoto.com> <19990309170720.03713@pauillac.inria.fr> <36E56E68.3C58A858@ibmoto.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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