caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re: Syntax for label
@ 2000-03-14 16:53 Don Syme
  2000-03-14 18:05 ` Pierre Weis
  2000-03-15  3:15 ` Syntax for label, NEW PROPOSAL Jacques Garrigue
  0 siblings, 2 replies; 61+ messages in thread
From: Don Syme @ 2000-03-14 16:53 UTC (permalink / raw)
  To: 'caml-list@inria.fr'

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1358 bytes --]



And why not "as", i.e. "t as x", as I explained once in a previous post.
I never did get an explanation as to why this wasn't an better solution.  It
reuses a rarely-used keyword in a perfectly backward-compatible way.  
I think it's simply a typical case of a new (and not necessarily terribly 
crucial) language feature muscling in on the limited "ultra-convenient" 
concrete syntax that's available!   No offence intended ;-)

Cheers,
Don


-----Original Message-----
From: Christophe Raffalli [mailto:Christophe.Raffalli@univ-savoie.fr]
Sent: 10 March 2000 18:45
To: caml-redistribution@pauillac.inria.fr
Subject: Syntax for label



It is clear that labels are a good thing ...

But why did you use the same character ":" for types and labels !

whit not (for instance) x:t to say that x as type t
and                     l#x to say that x as label l

the syntax l#x:t is much better than l:x : t !!

I know that # is allready used for methods ... but some characters are
still usable:

~
£ it looks like the l of labels (but its ascii code is greater than 128,
but is this really a problem ? probably ?)

-- 
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI



^ permalink raw reply	[flat|nested] 61+ messages in thread
* RE: Syntax for label, NEW SOLUTION
@ 2000-03-23  9:52 Toby Moth
  0 siblings, 0 replies; 61+ messages in thread
From: Toby Moth @ 2000-03-23  9:52 UTC (permalink / raw)
  To: caml-redistribution

[-- Attachment #1: Type: text/plain, Size: 2535 bytes --]

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
> -----------------------------------------

[-- Attachment #2: Type: text/html, Size: 6363 bytes --]

^ permalink raw reply	[flat|nested] 61+ messages in thread
* RE: Syntax for label, NEW SOLUTION
@ 2000-03-23  9:57 Toby Moth
  0 siblings, 0 replies; 61+ messages in thread
From: Toby Moth @ 2000-03-23  9:57 UTC (permalink / raw)
  To: 'caml-list@inria.fr'

[-- 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 --]

^ permalink raw reply	[flat|nested] 61+ messages in thread

end of thread, other threads:[~2000-04-06 13:21 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-14 16:53 Syntax for label Don Syme
2000-03-14 18:05 ` Pierre Weis
2000-03-15  3:15 ` Syntax for label, NEW PROPOSAL Jacques Garrigue
2000-03-15  6:58   ` Christophe Raffalli
2000-03-15 21:54     ` Julian Assange
2000-03-15 11:56   ` Wolfram Kahl
2000-03-15 13:58   ` Pierre Weis
2000-03-15 15:26     ` Sven LUTHER
2000-03-17  7:44       ` Pierre Weis
2000-03-15 17:04     ` John Prevost
2000-03-17 10:11       ` Jacques Garrigue
2000-03-15 17:06     ` Markus Mottl
2000-03-15 19:11     ` Remi VANICAT
2000-03-17  8:30       ` Pierre Weis
2000-03-17 14:05         ` Jacques Garrigue
2000-03-17 16:08           ` Pierre Weis
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
2000-03-29  8:42               ` Semantic of label: The best (only ?) solution to merge both mode Christophe Raffalli
2000-03-29  9:53                 ` Christophe Raffalli
2000-03-30  9:49                   ` John Max Skaller
2000-03-30  9:39                 ` John Max Skaller
2000-03-31  4:34                   ` Jacques Garrigue
2000-04-01  1:53                     ` John Max Skaller
2000-04-02 19:24                     ` Christophe Raffalli
2000-04-04  5:50                       ` Jacques Garrigue
2000-04-03  7:57                     ` backward compatibility Christophe Raffalli
2000-03-15 21:30     ` Syntax for label, NEW PROPOSAL John Max Skaller
2000-03-16  2:55     ` Jacques Garrigue
2000-03-17 15:13       ` Pierre Weis
2000-03-17 17:33         ` Wolfram Kahl
2000-03-18 11:59         ` Jacques Garrigue
2000-03-21 16:51       ` Pascal Brisset
2000-03-23 11:14         ` Nicolas barnier
2000-03-24  9:54           ` labels & ocaml 3 & co David Mentré
2000-03-24 12:19             ` David Mentré
2000-03-21 22:22       ` Unsigned integers? John Max Skaller
2000-03-22 16:22         ` Sven LUTHER
2000-03-23  2:08           ` Max Skaller
2000-03-23  7:50             ` Sven LUTHER
2000-03-24  2:50             ` Jacques Garrigue
2000-03-24 15:59               ` Xavier Leroy
2000-03-25  4:03               ` John Max Skaller
2000-03-24 14:50             ` Xavier Leroy
2000-03-22 17:05         ` Jean-Christophe Filliatre
2000-03-22 19:10           ` Markus Mottl
2000-03-23  2:41           ` Max Skaller
2000-03-22 19:47         ` Xavier Leroy
2000-03-23 12:55           ` John Max Skaller
2000-03-16  8:50     ` Syntax for label, NEW PROPOSAL Pascal Brisset
2000-03-17 11:15       ` Sven LUTHER
2000-03-18  0:04     ` Syntax for label, ANOTHER " Steven Thomson
2000-03-15 20:39   ` Syntax for label (and more) Xavier Leroy
2000-03-17 10:03     ` Christian RINDERKNECHT
2000-03-17 17:19       ` Christophe Raffalli
2000-03-21  1:29     ` Markus Mottl
2000-03-23  9:52 Syntax for label, NEW SOLUTION Toby Moth
2000-03-23  9:57 Toby Moth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).