From: Mehdi Dogguy <mehdi@dogguy.org>
To: Philippe Wang <mail@philippewang.info>
Cc: Gerd Stolpmann <info@gerd-stolpmann.de>, caml-list@inria.fr
Subject: Re: [Caml-list] Channels not closed on gc?
Date: Mon, 21 May 2012 16:48:29 +0200 [thread overview]
Message-ID: <4FBA55BD.2070701@dogguy.org> (raw)
In-Reply-To: <CAAFfW_p1gfrDsnWfnP5gj7-5Qa4YSgsvB4Nx7Uq_RDVCOq1m5w@mail.gmail.com>
On 21/05/12 16:18, Philippe Wang wrote:
> On Mon, May 21, 2012 at 3:31 PM, Gerd
> Stolpmann<info@gerd-stolpmann.de> wrote:
>
>>> Wouldn't it be a good idea to provide both ways? i.e., one that
>>> collects automatically, in addition to the current one that
>>> doesn't.
>>
>> You can easily do this yourself:
>>
>> Gc.finalise close_in ch
>
> Certainly, but I meant on a high-level way, without the need to
> explicitly use OCaml's internal API, for the sake of "non ocaml
> hackers". :)
>
IIRC, OCaml core team has always been reluctant to add
non-essential-to-the-compiler features/helpers in OCaml's stdlib. This
proposal fits the "non-essential-to-the-compiler" description :)
Besides, if I'm not mistaken, Batteries already provide such mechanism
(See module BatIO). Some "non ocaml hackers" can already use it!
Regards,
--
Mehdi Dogguy مهدي الدڤي
http://dogguy.org/
next prev parent reply other threads:[~2012-05-21 14:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-21 11:23 Lauri Alanko
2012-05-21 11:57 ` AW: " Gerd Stolpmann
2012-05-21 12:53 ` Philippe Wang
2012-05-21 13:31 ` Gerd Stolpmann
2012-05-21 14:18 ` Philippe Wang
2012-05-21 14:48 ` Mehdi Dogguy [this message]
2012-05-29 12:08 ` AW: " Goswin von Brederlow
2012-05-29 12:46 ` Gerd Stolpmann
2012-05-29 14:13 ` oliver
2012-05-29 18:39 ` Török Edwin
2012-05-29 18:58 ` Philippe Veber
2012-05-29 12:49 ` Jérémie Dimino
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=4FBA55BD.2070701@dogguy.org \
--to=mehdi@dogguy.org \
--cc=caml-list@inria.fr \
--cc=info@gerd-stolpmann.de \
--cc=mail@philippewang.info \
/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