Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* [Caml-list] A confusing sentence in documentation of Gc.finalise.
@ 2017-06-18 13:19 Evgeny Roubinchtein
  2017-06-18 13:26 ` Gabriel Scherer
  0 siblings, 1 reply; 2+ messages in thread
From: Evgeny Roubinchtein @ 2017-06-18 13:19 UTC (permalink / raw)
  To: OCaml Mailing List

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-18 13:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-18 13:19 [Caml-list] A confusing sentence in documentation of Gc.finalise Evgeny Roubinchtein
2017-06-18 13:26 ` Gabriel Scherer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox