Closures, too much or too little?
howard.lovatt at iee.org
Mon Nov 23 03:39:13 PST 2009
Sure for BGGA it suppresses a warning, but there would be nothing to stop
inner classes been changed to the same mechanism (I think CISE proposed
something similar). For a library as opposed to a language feature you could
change the @Shared to provide automatic wrapping in a holder. This is not
quite the same, in that you would get an error as opposed to a warning if
@Shared was absent.
However, I prefer the error since I am not a fan of warning messages and
thought Java was better before warnings and I am therefore not fazed by
this. I also find the advise that annotations don't change program behavior
a little silly. Half the time your program won't even run without the
correct annotations in many frameworks!
2009/11/22 Neal Gafter <neal at gafter.com>
> On Sun, Nov 22, 2009 at 12:20 PM, Howard Lovatt <howard.lovatt at iee.org>wrote:
>> I agree with your point that it really only captures finals (which as you
>> say are simple values of an expression in the LamdaJ 'closure'), but to me
>> this is a secondary issue. A @Shared annotation could be introduced that
>> works with inner classes and with LamdaJ closures.
> @Shared in BGGA just suppresses a warning; it has no effect on the
> semantics of the code. I have no idea what specification for an annotation
> you have in mind that could affect the way lambdaj works.
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
More information about the coin-dev