Simplifying sequential() / parallel()
Brian Goetz
brian.goetz at oracle.com
Fri Mar 22 07:41:45 PDT 2013
> Stateful programming has its issues but that ship has already sailed (in
> Java).
While that's unquestionably true, I think it is also unnecessarily
defeatist. A tremendous amount of effort has gone into the design of
this API to make statefulness less attractive because there's an easier
way to do it without statefulness.
> I don't want to create danger zones in the code where these
> transformations are accidents waiting to happen. Also think of the code
> maintainers trying to determine, as they are enhancing and debugging the
> code, where they are allowed to add state.
>
> Before, the existence of parallel() created a danger zone, but
> sequential() restored safety. That's an easy rule to understand.
The newly proposed rule does the same. The only problem is what happens
when responsibility for a pipeline is divided across code regions.
Which I'm arguing is always problematic with statefulness lambdas
regardless of model.
More information about the lambda-libs-spec-experts
mailing list