[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2006-03-22 (08:19) |
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