develooper Front page | perl.perl6.language | Postings from November 2002

Re: String concatentation operator

Thread Previous | Thread Next
From:
Damian Conway
Date:
November 18, 2002 23:08
Subject:
Re: String concatentation operator
Message ID:
3DD9E38D.2020209@conway.org
Dan Sugalski wrote:

> We're definitely going to need to nail the semantics down. Would one 
> thread throwing an exception require all the threads being aborted, for 
> example?

I would imagine so. You can't reasonably build a junction out of values
that weren't successfully created. If you write:

	$var = die();

you get an exception thrown. Why should it be any different if the rvalue
was trying to assume other non-exceptional values as well:

	$var = foo() | bar() | die();

The whole point of junctions is "No Visible Parallelism": all the parallelism
occurs inside the junction constructor. At the end of construction your single
thread gets back a single scalar. And if the construction of that single
scalar involved an exception, your single thread should get that exception.

As for short-circuiting: why not? Junctions are inherently unordered, so
there's no guarantee which state of the junction is processed first
(whether they're being processed in parallel or series).

Damian


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About