Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Evgeny Roubinchtein <zhenya1007@gmail.com>
To: OCaml Mailing List <caml-list@inria.fr>
Subject: [Caml-list] A confusing sentence in documentation of Gc.finalise.
Date: Sun, 18 Jun 2017 09:19:58 -0400	[thread overview]
Message-ID: <CAGYXaSYvBxSgEwbCqdP7sXfgBmRsuD_xaPVzfJjAvDSW6faKaQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1438 bytes --]

Dear OCaml users and developers,

The description of Gc.finalise (as can be seen, for example, at
http://caml.inria.fr/pub/docs/manual-ocaml/libref/Gc.html), contains the
following statement:

>  The results of calling String.make
<http://caml.inria.fr/pub/docs/manual-ocaml/libref/String.html#VALmake>,
Bytes.make
<http://caml.inria.fr/pub/docs/manual-ocaml/libref/Bytes.html#VALmake>,
Bytes.create
<http://caml.inria.fr/pub/docs/manual-ocaml/libref/Bytes.html#VALcreate>,
Array.make
<http://caml.inria.fr/pub/docs/manual-ocaml/libref/Array.html#VALmake>, and
ref
<http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#VALref>
are guaranteed to be heap-allocated and non-constant *_except when the
length argument is 0*_ [emphasis mine].

The reason I find it confusing is that ref does not take, a "length
argument."

My semi-educated guess is that the intended meaning is something like, "If
the length argument of a call to String.make, Bytes.make, Bytes.create, or
Array.make is not 0, the result is guaranteed to be heap-allocated and
non-constant.  The result of a call to ref is [always] guaranteed to be
heap-allocated and non-constant."

Could someone either confirm my guess or tell me that I am mistaken?  Also,
if my guess is, in fact, accurate, what's the best way to add my suggested
revision to the "to consider for inclusion into the next version of the
manual" list?

Thank you in advance!

-- 
Best,
Zhenya

[-- Attachment #2: Type: text/html, Size: 2114 bytes --]

             reply	other threads:[~2017-06-18 13:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-18 13:19 Evgeny Roubinchtein [this message]
2017-06-18 13:26 ` Gabriel Scherer

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=CAGYXaSYvBxSgEwbCqdP7sXfgBmRsuD_xaPVzfJjAvDSW6faKaQ@mail.gmail.com \
    --to=zhenya1007@gmail.com \
    --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