Version française
Home     About     Download     Resources     Contact us    
Browse thread
syntax annoyance
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@m...>
Subject: Re: [Caml-list] syntax annoyance
From: j h woodyatt <jhw@conjury.org>

> > # Some object method x = 0 method y = 1 end;;
> > Syntax error
> > # Some (object method x = 0 method y = 1 end);;
> > - : < x : int; y : int > option = Some <obj>
> 
> It seems to me that the parentheses are sorta redundant, and it would  
> be nice if they could be elided.  It's weird that the "r option" case  
> works without additional parentheses and the "<obj> option" requires  
> them.

Look at the above two lines, and tell me which one is more readable :-)
I hesitated a while before deciding the priority, particularly
considering that the similar looking "begin ... end" doesn't need
parentheses. But I concluded that you don't want _too_ many
parentheses-like constructs in the language.

Jacques Garrigue