Checked exceptions within Block<T>
Steven Simpson
ss at comp.lancs.ac.uk
Mon Jan 14 02:37:57 PST 2013
On 12/01/13 17:49, Brian Goetz wrote:
> The available language-based solutions were losers from a
> complexity/value tradeoff. Though there are some alternative solutions
> we are going to continue to explore -- though clearly not for 8 and
> probably not for 9 either.
I can imagine solutions where you provide exception transparency, but
permit it only when some form of serial guarantee is formally made by
the method accepting the functional interface. Will using the same
Stream type for both serial and parallel operations get in the way of
those solutions? Does it make sense to split it into two now, while
disruption can be minimized?
Define SerialStream to extend Stream, having all the same operations
(except returning SerialStream where appropriate), but informally
providing serial guarantees. Later, if it becomes possible to formally
declare a method with serial guarantees, you can fit them to
SerialStream while leaving Stream untouched. Where the guarantees are
made, the compiler can permit the transparencies that those guarantees
allow, including exception transparency.
Cheers,
Steven
More information about the lambda-dev
mailing list