From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA19522 for ; Thu, 23 Mar 2000 11:24:58 +0100 (MET) Received: from qnsgs000.nortel.com (qnsgs000.nortelnetworks.com [47.211.0.31]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id LAA18509 for ; Thu, 23 Mar 2000 11:24:57 +0100 (MET) Received: from zhard00m.europe.nortel.com (actually zhard00m) by qnsgs000.nortel.com; Thu, 23 Mar 2000 09:57:46 +0000 Received: by zhard00m.europe.nortel.com with Internet Mail Service (5.5.2650.21) id ; Thu, 23 Mar 2000 09:52:44 -0000 Message-ID: <61ABD11436FED21192440000F81F3E3603634769@nwcwi1a.europe.nortel.com> From: "Toby Moth" To: caml-redistribution@pauillac.inria.fr Subject: RE: Syntax for label, NEW SOLUTION Date: Thu, 23 Mar 2000 09:52:31 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01BF94AD.892ED3C6" This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01BF94AD.892ED3C6 Content-Type: text/plain I have kept out of the label debate as I haven't had a chance to really play with 2.99 yet, have hardly ever used OLabl, and generally feel more optimistic about what labels might offer me than terrified about how Ocaml might suffer. So, I am just throwing an ill-cautioned suggestion when I say that it looks to me as if Claudio is onto something. Would it be possible to set up something along the lines: MyModule:foo need labels MyModule.foo labels checked if used open MyModule: needs labels open MyModule labels checked if used Then the only case where you are committed is when you are inside a module that you are actually writing using functions that you have just defined. But if you are using labels inside your own module then surely you can't object to labels...... then surely you are happy with a label enforcing mode. I suppose then that you would be able to write Mod1.Mod2:foo Mod1:Mod2:foo and it would mean the same thing. Is this impossible to implement ? Toby Moth > -----Original Message----- > From: Claudio Sacerdoti Coen [SMTP:sacerdot@students.cs.unibo.it] > Sent: 22 March 2000 18:15 > To: caml-redistribution@pauillac.inria.fr > Subject: Re: Syntax for label, NEW SOLUTION > > 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 > ----------------------------------------- ------_=_NextPart_001_01BF94AD.892ED3C6 Content-Type: text/html Content-Transfer-Encoding: quoted-printable RE: Syntax for label, NEW SOLUTION

I have kept out of = the label debate as I haven't had a chance to really play with = 2.99
yet, have hardly = ever used OLabl, and generally feel more optimistic about what = labels
might offer me than = terrified about how Ocaml might suffer.

So, I am just = throwing an ill-cautioned suggestion when I say that it looks to = me
as if  Claudio = is onto something.

Would it be possible = to set up something along the lines:

MyModule:foo       need = labels
MyModule.foo       labels = checked if used

open = MyModule:    needs labels
open = MyModule     labels checked if used

Then the only case = where you are committed is when you are inside a module
that you are = actually writing using functions that you have just defined.
But if you are = using labels inside your own module then surely you can't object
to = labels......
then surely you are = happy with a label enforcing mode.

I suppose then that = you would be able to write

Mod1.Mod2:foo
Mod1:Mod2:foo

and it would mean = the same thing.

Is this impossible = to implement ?


Toby Moth

    -----Original Message-----
    From:   Claudio Sacerdoti Coen = [SMTP:sacerdot@students.cs.unibo.it]
    Sent:   22 March 2000 18:15
    To:     caml-redistribution@pauillac.inria.fr
    Subject:       = Re: Syntax for label, NEW = SOLUTION

    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 =3D 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
    -----------------------------------------

------_=_NextPart_001_01BF94AD.892ED3C6--