Function types versus arrays

Neal Gafter neal at gafter.com
Wed Feb 17 15:51:28 PST 2010


On Wed, Feb 17, 2010 at 3:10 PM, Neal Gafter <neal at gafter.com> wrote:
> On Wed, Feb 17, 2010 at 2:59 PM, Joshua Bloch <jjb at google.com> wrote:
>> I really don't understand this.  Earlier on, Alex said that we should
>> refrain from thinking too hard about the implementation at this point, and I
>> still believe that to be true.  If you could show that some interaction of
>> the proposed syntax and semantics interacted poorly with the existing type
>> system, that would be a big problem, but I haven't seen such an argument
>> that didn't presuppose a particular implementation of function types. I
>> really do think we should design the best spec (syntax and semantics) and
>> then see if it's implementable.
>
> I agree with the process you describe.  I just think we're a couple of
> steps ahead of you.  Setting aside the precise syntax, there is a
> specific problematic interaction of the currently proposed semantics
> with the existing type system, and we're exploring the fallout of that
> issue.  We don't have to wait for the syntax to be settled to explore
> the fallout of the semantics issue, and as I pointed out resolving the
> semantic issue can help guide the syntax.

I should add that Howard relaunched this thread with the idea of
relaxing Java's usual assumption that a subtype conversion preserves
the identity of the reference.  I don't think that relaxation actually
solves the problem, and it does break other things in the language.
But it is worth spending some time determining if and how it breaks.


More information about the lambda-dev mailing list