Overload resolution simplification
neal at gafter.com
Sun Aug 11 19:11:33 PDT 2013
On Sun, Aug 11, 2013 at 2:23 AM, maurizio cimadamore <
maurizio.cimadamore at oracle.com> wrote:
> On 10-Aug-13 10:52 PM, Remi Forax wrote:
>> You mean if you have overloads that are generics ?
> No - in general; as soon as you start type-checking a lambda once per
> overload I think it's unavoidable to end up in a combinatorial scenario for
> lambda such as this:
> where m, g, f are overloads.
This is true. However in practice
1. the compiler can cache the results of the conversion of each lambda
to each target type that is attempted, which eliminates most of the work,
2. people do not write code such as this except to stress your compiler.
More information about the lambda-spec-observers