From: Benoit de Boursetty <debourse@email.enst.fr>
To: caml-list@inria.fr
Subject: files & handlers...
Date: Sat, 5 Feb 2000 11:37:19 +0100 (MET) [thread overview]
Message-ID: <Pine.GSO.4.02.10002051126370.24251-100000@young.enst.fr> (raw)
Hi,
Here is a naive, user-point-of-view question!
I think we all find the ML language is not tailored to handle file
accesses as they were implemented in current systems, don't we? All of us
wrote some day the following code:
let f = open_in filename in
let temp = input_line f in
close f;
temp;;
And if you write this:
let f = open_in filename in input_line f;;
(which is more natural to me)
you can never close the file you've opened.
What would the language have to support in order that opened files be
automatically closed when they get out of reach from the program? Is it
what is called "finalization"?
Thanks for your help
Benoit de Boursetty
next reply other threads:[~2000-02-07 9:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-02-05 10:37 Benoit de Boursetty [this message]
2000-02-07 15:23 ` Stefan Monnier
2000-02-07 15:46 ` Markus Mottl
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=Pine.GSO.4.02.10002051126370.24251-100000@young.enst.fr \
--to=debourse@email.enst.fr \
--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