Exception transparency
Brian Goetz
brian.goetz at oracle.com
Tue Jun 8 06:16:25 PDT 2010
> 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.
More information about the lambda-dev
mailing list