overload patterns/anti-patterns (original) (raw)
Doug Lea dl at cs.oswego.edu
Sat Dec 29 07:10:32 PST 2012
- Previous message: overload patterns/anti-patterns
- Next message: overload patterns/anti-patterns
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 12/29/12 09:59, Brian Goetz wrote:
My current sense is that, no matter how much lambda-overload matching is tweaked, this will remain a common API design gotcha, and the best advice is to never overload solely on function type. ... where the function types have the same arity.
.. of arguments. The "x -> foo()" vs "x -> { foo(); }" issue (and variants) ambiguate cases of no result vs a result.
Similarly, it is a key goal to make overloading on specialized return type safe,
Modulo the above? Or is this an important enough goal to require that void actions use braces?
-Doug
- Previous message: overload patterns/anti-patterns
- Next message: overload patterns/anti-patterns
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the lambda-libs-spec-experts mailing list