Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] ocaml killer
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-01-30 (00:17)
From: Lauri Alanko <la@i...>
Subject: Re: [Caml-list] ocaml and concurrency
On Thu, Jan 29, 2004 at 06:54:58PM +0100, Andreas Rossberg wrote:
> Martin Berger wrote:
> >
> >wouldn't you say that the lack of real closures is a consequence
> >of java's lack of a proper function space arrow, rather than a
> >separate issue? i don't see how you could have ocaml's full --->
> >without real closures, but maybe i'm missing something.
> In Java, inner classes could give you (a clumsy form of) closures as 
> well, but they don't (since they may not capture non-static variables).

Yes they can, though only if the variables are declared final (for
obvious reasons). See JLS 8.1.2:

	Any local variable, formal method parameter or exception
	handler parameter used but not declared in an inner class must
	be declared final, [...]

Lauri Alanko

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: