caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Oliver Bandel <oliver@first.in-berlin.de>
To: Josh Berdine <josh@berdine.net>
Cc: "Richard W.M. Jones" <rich@annexia.org>, caml-list@inria.fr
Subject: Re: [Caml-list] Syntax puzzle / suggestion
Date: Sat, 10 Aug 2019 17:18:08 +0200	[thread overview]
Message-ID: <20190810151808.mjo4goao6mtwxzqw@first.in-berlin.de> (raw)
In-Reply-To: <BD3A01EE-3256-4C45-A217-FF2B6D659FBA@berdine.net>

Quoting  Josh Berdine <josh@berdine.net> (snt: 2019-08-09 16:51 +0200 CEST) (rcv: 2019-08-09 16:53 +0200 CEST):
> What about good old-fashioned state:
[...]

I guess you mean style, not state.
And I would agree that inventing just another syntax would not be
necessary,

> 
> let all_items = ref []
> let add_item item = all_items := (item :: !all_items, item)

This does not xomnpile, but thie here does:

let add_item item = all_items := (item :: !all_items); item


Ciao,
  Oliver


  reply	other threads:[~2019-08-10 15:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09 14:27 Richard W.M. Jones
2019-08-09 14:40 ` Gabriel Scherer
2019-08-09 14:45   ` Richard W.M. Jones
2019-08-09 14:48 ` Martin Riener
2019-08-10  5:19   ` rixed
2019-08-09 14:51 ` Josh Berdine
2019-08-10 15:18   ` Oliver Bandel [this message]
2019-08-10 20:34   ` Chet Murthy
2019-08-09 14:56 ` Frédéric Bour

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=20190810151808.mjo4goao6mtwxzqw@first.in-berlin.de \
    --to=oliver@first.in-berlin.de \
    --cc=caml-list@inria.fr \
    --cc=josh@berdine.net \
    --cc=rich@annexia.org \
    /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).