Exception transparency

Daniel Yokomizo daniel.yokomizo at gmail.com
Tue Jun 8 17:54:04 PDT 2010


On Tue, Jun 8, 2010 at 10:16 AM, Brian Goetz <brian.goetz at oracle.com> wrote:
>> It should be possible to write a safe compose:
>>
>> <F, G, H, throws X, throws Y>  Function<F, H, throws X | Y>
>> compose(Function<F, G, X>  fg, Function<? super G, H, Y>  gh);
>>
>> And store the composed function in a variable. For this to work we
>> need to have disjunctive type as a first class citizen (as Peter
>> pointed in a previous message).
>
> Can you elaborate on why this requires *first-class* disjunctive types?  The
> signature you write seems perfectly allowable within a framework that allows
> a disjunction-like entity at the use site of a throws type variable.

Actually I'm wrong, my use-case requires only disjunctive type as type
or method type parameters, so second-class is ok.

Best regards,
Daniel Yokomizo


More information about the lambda-dev mailing list