Syntax decision
Zhong Yu
zhong.j.yu at gmail.com
Thu Sep 29 22:11:28 PDT 2011
Since 0-arg case is quite common, as in Runnable and Callable, we'll
have many use cases like
cache.get(key, ()->load(key));
tasks.add(()->{ doSomething(arg);});
transaction(()->{
statement1;
statement2;
});
Not bad after staring at them for 30 minutes. But too many consecutive
punctuation marks are there... quite dizzy at first sight.
How about a single punctuation mark, currently unused, as syntax sugar
for "()->". Too cheesy?
- Zhong Yu
More information about the lambda-dev
mailing list