A syntax option (function types versus arrays)
Neal Gafter
neal at gafter.com
Mon Mar 1 16:14:22 PST 2010
On Mon, Mar 1, 2010 at 3:55 PM, Joshua Bloch <jjb at google.com> wrote:
>> It doesn't make sense to
>> cripple the function type syntax to support something that is and
>> always will be unsafe.
>
> This language ("cripple the function type syntax") seems far too strong.
On the contrary, (to paraphrase Futurama) it isn't far too strong enough!
> Safe or not, I think it's highly desirable that we be able to express the
> type that represents an array of function types. Otherwise function types
> will be second-class citizens: you can (to the best of my knowledge) express
> arrays of every other Java type. This is not the sort of invariant to give
> up lightly.
If we add exception transparency, I expect we will do so by adding
disjunction types, and you will not be able to express arrays of those
either (never mind intersection types).
More information about the lambda-dev
mailing list