A syntax option (function types versus arrays)
Howard Lovatt
howard.lovatt at gmail.com
Thu Mar 11 22:09:53 PST 2010
Comments in line
On 12 March 2010 05:01, Joshua Bloch <jjb at google.com> wrote:
> My two cents:
> #< #< R() throws E >( #< R( A ) throws E >, A ) > curry =
> new #< #<R() throws E >( #< R( A ) throws E > l, A a ) >( l.( a ) );
> Nesting is nice, but:
>
> The angle brackets will remind people of generics, which won't make them
> happy.
It is type information, just like generics, therefore angle brackets
are the consistent choice.
> Angle brackets are a poor man's parentheses, because they do double duty as
> unmatched operators (less than and greater than).
Yes, but we already have them from generics so we are stuck with that double use
> The pound-sign+left-angle-bracket combo (#<) isn't exactly easy on the eyes.
Could use Lambda instead of #
> The new keyword will be viewed as exactly the kind of boilerplate that this
> effort was designed to eliminate.
Yes, but people also won't like the inconsistency of normal classes
requiring new and lambdas specifically not allowing new. A further
advantage of new is that it makes SAM types easier since you know
where the constructor is called.
> I do think it makes sense to explore new syntax proposals, but I'm not sure
> I like this one better than the one that's currently on the table.
> Josh
-- Howard.
More information about the lambda-dev
mailing list