The lambda conversion and a lambda body that doesn't complete.

Rémi Forax forax at
Wed Mar 2 09:37:27 PST 2011

On 03/02/2011 06:09 PM, Ben Evans wrote:
> OK, I'll bite.

Fight ! fight !

> What's the interest in this use case?
> As I read it, you're saying that if the compiler can provably guarantee that
> a lambda cannot return normally, then the compiler should ignore the return
> type when SAM-converting. Is that the property we're after?

The compiler should have internally a type corresponding to will never 
But this type doesn't have to have a surface syntax.

> What's the use case for this feature? How often are we actually going to
> write code inside a lambda which the compiler can guarantee will not return
> normally? Should we even be encouraging people to write code like that?

Use case: Error handlers like the ones used when doing charset conversions.
Anyway we need that for completeness.

> Glaringly obvious use cases and other smackdown in 3-2-1.... :)
> Ben


More information about the lambda-dev mailing list