caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* files & handlers...
@ 2000-02-05 10:37 Benoit de Boursetty
  2000-02-07 15:23 ` Stefan Monnier
  2000-02-07 15:46 ` Markus Mottl
  0 siblings, 2 replies; 3+ messages in thread
From: Benoit de Boursetty @ 2000-02-05 10:37 UTC (permalink / raw)
  To: caml-list

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



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

end of thread, other threads:[~2000-02-08  8:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-05 10:37 files & handlers Benoit de Boursetty
2000-02-07 15:23 ` Stefan Monnier
2000-02-07 15:46 ` Markus Mottl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).