Exception transparency
Reinier Zwitserloot
reinier at zwitserloot.com
Tue Jun 8 00:16:33 PDT 2010
Indeed. But how often does that happen? There are always pros and cons to be
weighed. No one system is perfect. Brian's is unwieldy, and does not seem to
answer a simple question - how to add exception transparency to
Collections.sort. Mine is simpler and answers that question, but isn't
composable.
--Reinier Zwitserloot
On Tue, Jun 8, 2010 at 8:40 AM, Neal Gafter <neal at gafter.com> wrote:
> On Mon, Jun 7, 2010 at 9:53 PM, Reinier Zwitserloot <
> reinier at zwitserloot.com> wrote:
>
>> Making the exceptions transparent by encoding them in the type system is
>> going to be very unwieldy, even if a "throws T" variadic type parameter
>> concept is introduced. I've got a much better idea: Escape detection on
>> closures. Any closures that are guaranteed to run such that the runtime
>> stack matches the lexical stack can get exception transparency completely
>> free, no new syntax and no new concepts required; it would "just work".
>>
>
> Reinier: your scheme, even assuming it could be checked at compile-time,
> does not work for functions that are to be stored in variables or in a data
> structure (for example, a collection of callback functions). It is not
> composable.
>
More information about the lambda-dev
mailing list