From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA15647 for caml-redistribution@pauillac.inria.fr; Mon, 7 Feb 2000 10:24:32 +0100 (MET) Resent-Message-Id: <200002070924.KAA15647@pauillac.inria.fr> Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA04265 for ; Sat, 5 Feb 2000 11:37:23 +0100 (MET) Received: from enst.enst.fr (enst.enst.fr [137.194.2.16]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id LAA17966 for ; Sat, 5 Feb 2000 11:37:22 +0100 (MET) Received: from email.enst.fr (muse.enst.fr [137.194.2.33]) by enst.enst.fr (8.9.1a/8.9.1) with ESMTP id LAA26032 for ; Sat, 5 Feb 2000 11:37:21 +0100 (MET) Received: from young.enst.fr (young.enst.fr [137.194.34.13]) by email.enst.fr (8.9.3/8.9.3) with ESMTP id LAA23703 for ; Sat, 5 Feb 2000 11:37:21 +0100 (MET) Received: from localhost (debourse@localhost) by young.enst.fr (8.8.8+Sun/8.8.8) with SMTP id LAA24357 for ; Sat, 5 Feb 2000 11:37:19 +0100 (MET) Date: Sat, 5 Feb 2000 11:37:19 +0100 (MET) From: Benoit de Boursetty To: caml-list@inria.fr Subject: files & handlers... Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Resent-From: weis@pauillac.inria.fr Resent-Date: Mon, 7 Feb 2000 10:24:32 +0100 Resent-To: caml-redistribution@pauillac.inria.fr 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