A syntax option (function types versus arrays)

Jakob Praher jp at hapra.at
Thu Mar 11 00:52:10 PST 2010


Gernot Neppert schrieb:
> Why not go all the way to:
>
> lambda<void,byte[],int,int, throws IOException> writer = new
> lambda<void,byte[] buf, int off, int len, throws IOException> {
> System.out.write(buf, off, len);
> }
>   
IMHO: It is far better to prefix the types with some letters than with a #.
Yet the question is if the type of the lambda is a lambda or if the type 
is a function.

If an we choose an ID why not name the type:

* fun<void (byte[], int, int ) throws IOExceptoin> writer = ...

Nesting is then:

* fun< fun<void (byte[], int, int) throws IOException> (String ) throws 
Throwable  > writerLookup = ...

What do you think?
The parenthesis reflect the argument signature and help with respect to 
nesting.


-- Jakob


More information about the lambda-dev mailing list