First code then select Syntax
Vladimir Kirichenko
vladimir.kirichenko at gmail.com
Sun Nov 22 05:55:52 PST 2009
Ali Ebrahimi wrote:
> Hi All.
>
> Just compare the different versions of following sample codes And then
> vote them:
Those are not realistic. There is no LINQ in java, it's noway parens
going to be optional, general language design is not going to be changed
backward incompatible, and custom control structures should not be
primary goal of this.
So here are mine.
1. Anonymous:
a)
array.sort(#boolean(int a, int b) a > b);
b)
array.sort(fun boolean(int a, int b) => a > b);
2. Named:
a)
#boolean(int,int) p = #boolean(int a, int b) a > b;
array.sort(p);
b)
^boolean(int,int) p = #boolean(int a, int b) a > b;
array.sort(p);
c)
fun boolean p(int a,int b) => a > b;
array.sort(p);
--
Best Regards,
Vladimir Kirichenko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
Url : http://mail.openjdk.java.net/pipermail/closures-dev/attachments/20091122/8e30b1c2/attachment.bin
More information about the closures-dev
mailing list