Re: Syntax for label, NEW SOLUTION

From: Claudio Sacerdoti Coen (sacerdot@students.cs.unibo.it)
Date: Wed Mar 22 2000 - 09:37:01 MET

  • Next message: David Chemouil: "variables in 'let rec'"

    On Mon, Mar 20, 2000 at 19:25:04 +0100, Christophe Raffalli wrote:
    > Ok, and I agree ! What I mean is that it could happend sooner if there
    > was a mode that is conservetive over both modern and classic modes. I
    > will give a first working answer ...

    There could be also another simple, backward compatible (w.r.t. OCaml)
    solution that would get rid of the "labels in the library" fight.
    Only, I don't know if it is (semantically) feasible. Here it is:

    If I write

     Moo.foo x a:y z;;

    or

     open Moo;;
     foo x a:y z;;

    or

     let module M = Moo in
      M.foo x a:y z;;

    than foo is label-checked as in classic mode.

    Instead, if I write

     open Moo in commutating mode;; (* or something like that *)
     foo x a:y z;;

    than foo is label-checked as in modern mode.

    So, for example, I could write

    open List;;
    open Unix as in moder mode.
    open Tk as in moder mode.

    What am I overlooking?

                                            C.S.C.

    -- 
    -----------------------------------------
    Real Name: Claudio Sacerdoti Coen
    Graduating students at the
     Department of Computer Science,
     university of Bologna
    Address: via del Colle n.6
    	 S. Lazzaro di Savena (BO)
    	 Italy
    e-mail:  sacerdot@cs.unibo.it
    -----------------------------------------
    



    This archive was generated by hypermail 2b29 : Wed Mar 22 2000 - 19:19:03 MET