caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: j h woodyatt <jhw@conjury.org>
To: The Caml Trade <caml-list@inria.fr>
Subject: syntax annoyance
Date: Tue, 21 Mar 2006 22:00:07 -0800	[thread overview]
Message-ID: <B73754DD-E0FF-4444-B097-217565611860@conjury.org> (raw)

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>




             reply	other threads:[~2006-03-22  6:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-22  6:00 j h woodyatt [this message]
2006-03-22  8:20 ` [Caml-list] " Jacques Garrigue

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=B73754DD-E0FF-4444-B097-217565611860@conjury.org \
    --to=jhw@conjury.org \
    --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;
as well as URLs for NNTP newsgroup(s).