Effectively final effective?

Neal Gafter neal at gafter.com
Wed Feb 24 17:39:13 PST 2010


On Wed, Feb 24, 2010 at 5:10 PM, Lawrence Kesteloot <lk at teamten.com> wrote:
> On Wed, Feb 24, 2010 at 4:34 PM, Neal Gafter <neal at gafter.com> wrote:
>> Scala and C# and Ruby programmers, and programmers in many other
>> languages, live without this restriction.  Perhaps we should ask them.
>>  In my experience it is a blessing compared to the Java alternatives.
>
> That's fine, but you're implicitly agreeing that you're okay with my
> innocent Math.max() assignment changing the implementation from a
> value-copy to a heap-store, along with the potential performance
> implications.

No; the compiler should be free to use any code sequence that
implements the semantics required by the language.  In this case, the
compiler should be able to prove that a copy is correct, and should be
free to generate code that way.


More information about the lambda-dev mailing list