Browse thread
CamlIDL - stub code generator and COM binding for OCaml
-
Xavier Leroy
-
Andrew Martin
- Sven LUTHER
-
Xavier Leroy
-
Andrew Martin
- Thierry Bravier
- Jacques GARRIGUE
-
Andrew Martin
-
Andrew Martin
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Thierry Bravier <Thierry.Bravier@d...> |
| 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