[
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: | -- (:) |
| From: | j h woodyatt <jhw@c...> |
| Subject: | syntax annoyance |
everyone--
You know what?
> # type r = { x : int; y: int };;
> type r = { x : int; y : int; }
> # Some { x = 0; y = 1 };;
> - : r option = Some {x = 0; y = 1}
> # 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.
Just venting. Thanks for listening.
—
j h woodyatt <jhw@conjury.org>