Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] GC and file descriptors
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Samuel Lacas <Samuel.Lacas@t...>
Subject: Re: [Caml-list] GC and file descriptors
Ville-Pertti Keinonen wrote:
> On Wed, Nov 19, 2003 at 11:25:53PM +1100, skaller wrote:
[snip]
> I wouldn't call it conventional lexical scoping considering that the
> following is an error:
> 
> x = 1
> def f():
>     x += 1
>     return x
> 
> I very much prefer having explicit let (and let rec) constructs like in
> OCaml.

Yes, but the following works:

x = 1
def f():
    global x # needed to reference x
    x += 1
    return x

Thus, everything is just in the "conventional". Different languages 
seems to have different conventions.

sL

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners