Skip to content

Processes as operator closures #3272

@bentsherman

Description

@bentsherman

Based on this discussion: #2521 (comment)

Processes and operators are functionally equivalent, in that they transform input channels into output channels. The different is that operators execute native Groovy code while processes execute bash scripts. Ultimately a process is just syntax sugar for an operator that executes a shell command, and it makes it much easier to work with files.

Some operators take a closure argument, for example, reduce. But, what if the closure (i.e. reduction kernel) was a process? That would make it much easier to perform reductions over files, whereas currently you have to use the experimental recursion feature.

If we could simply make processes interchangeable with operator closures, it would make operators a lot more powerful without the need for an entirely separate feature like recursion (although explicit recursion might still have its use).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions