caml-list - the Caml user's mailing list
 help / 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
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 index

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 publically 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

caml-list - the Caml user's mailing list

Archives are clonable:
	git clone --mirror http://inbox.vuxu.org/caml-list
	git clone --mirror https://inbox.ocaml.org/caml-list

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.caml-list


AGPL code for this site: git clone https://public-inbox.org/ public-inbox