stack-bound vs. travelling closures proposal.

Reinier Zwitserloot reinier at zwitserloot.com
Thu Jun 17 22:14:16 PDT 2010


Using concurrency is not the problem. It's writing the libraries. I'm
working on the theory that the number of people engaged in writing low-level
concurrency libraries is limited. Get it right once, in other words.

strawman makes using these libraries more difficult because most SAM types
will have to be retired to support 'throws E'. It also makes writing utility
functions that don't themselves engage in concurrency (though they can of
course use received closures as arguments to concurrent utilities) far
harder than stack-bound; stack-bound actually gives exception transparency
to such functions for the mere cost of adding 1 keyword to the appropriate
parameter.

--Reinier Zwitserloot



On Fri, Jun 18, 2010 at 6:42 AM, Neal Gafter <neal at gafter.com> wrote:

> On Thu, Jun 17, 2010 at 6:12 PM, Reinier Zwitserloot
> <reinier at zwitserloot.com> wrote:
> > Parellizing sort can be done in a similar way to the example
> implementation
> > of forEachParallelized.
> > Yes, it's ugly, and involves both unshackle and sneakyThrow, but it would
> > work just fine.
>
> Recall that better concurrency support is one of the motivations for
> adding lambda.  If the language forces programmers to undermine the
> type system (or exception checking system) in order to use
> concurrency, then we've failed.
>


More information about the lambda-dev mailing list