yet another function types syntax variation
Zdenek Tronicek
tronicek at fit.cvut.cz
Tue Feb 9 05:05:58 PST 2010
Peter Levart napsal(a):
> What would happen if the '#' and 'ReturnType' changed places?
>
> FunctionType:
> ReturnType '#' '(' ParameterTypes_opt ')' Throws_opt
>
>
> Nested return types might look better:
>
> ##int(byte[],int,int)(throws IOException)(File)(throws IOException)
>
> vs.
>
> int #(byte[],int,int) throws IOException #(File) throws IOException
My subjective opinion is: it does not look better. Why? I am reading the
line from left to right. If I see ## I know that the return type is
function. In your proposal, I have to read all "int #(byte[],int,int)
throws IOException" until I get to know that it is return type.
Z.
--
Zdenek Tronicek
FIT CTU in Prague
More information about the lambda-dev
mailing list