From: "Toby Moth" <tmoth@nortelnetworks.com>
To: "'caml-list@inria.fr'" <caml-list@inria.fr>
Subject: RE: Syntax for label, NEW SOLUTION
Date: Thu, 23 Mar 2000 09:57:53 -0000 [thread overview]
Message-ID: <61ABD11436FED21192440000F81F3E360363476A@nwcwi1a.europe.nortel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2727 bytes --]
( sorry if this got posted twice )
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......
so 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. Style would suggest that you use all ':'
or all '.'.
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
-----------------------------------------
Toby Moth
Concorde Road, Norreys Drive, Maidenhead,
Berkshire SL6 4AG UK
Tel: +44 (0)1628 434301 Fax: +44 (0)1628 434875 Email:
tmoth@nortelnetworks.com
> NgRTEL NETWORKS
>
>
[-- Attachment #2: Type: text/html, Size: 7215 bytes --]
next reply other threads:[~2000-03-23 12:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-23 9:57 Toby Moth [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-03-23 9:52 Toby Moth
2000-03-17 8:30 Syntax for label, NEW PROPOSAL Pierre Weis
2000-03-17 14:05 ` Jacques Garrigue
2000-03-18 10:32 ` Syntax for label, NEW SOLUTION Christophe Raffalli
2000-03-19 2:29 ` Jacques Garrigue
2000-03-20 18:25 ` Christophe Raffalli
2000-03-22 8:37 ` Claudio Sacerdoti Coen
2000-03-21 23:29 ` John Max Skaller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=61ABD11436FED21192440000F81F3E360363476A@nwcwi1a.europe.nortel.com \
--to=tmoth@nortelnetworks.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox