Terminology
Alex Blewitt
alex.blewitt at gmail.com
Thu Dec 17 07:08:58 PST 2009
On Dec 17, 2009, at 15:03, Peter Levart wrote:
> On Thursday 17 December 2009 13:24:20 Alex Blewitt wrote:
>> For example, Capture F above accesses an instance field of the
>> current
>> class. However, consider:
>
> I would even go further in this case and create the following
> equivalent code:
The point was to try and identify the terminology used, so we could
discuss the implementation detail later. For those that were
serializable, having a readResolve would make sense though.
> The holder of the closure singleton should be the generated closure
> class itself. This way deserialization can return the singleton
> instance without loading and initializing the defining class (F2 in
> this case).
An important thing to note is that it is not, in fact, a closure. It's
a lambda. Some lambdas are closures, and some closures are lambdas,
but all lambdas are not closures and all closures are not lambdas.
This is one of the reasons to try and nail down terminology :-)
Alex
More information about the lambda-dev
mailing list