Replies: 1 comment 1 reply
-
I disagree that only pure functions are functions, and a concept based solely on pure functions does not map to the paradigm of a workflow, which is the goal of dewret. Nearly all workflow description languages use global level inputs, which correspond directly to global variables -- while they are mapped as explicit inputs to an individual step, any step, no matter how deeply nested, can access the global level inputs. Moreover, given that these context-aware functions can be directly mapped to pure functions taking explicit input (by un-/currying), these two concepts are theoretically identical, and the difference is in notation - but the current approach is still closer to the intention and notation of standard workflow description systems. Perhaps a more palatable way of viewing this is that the python module represents the workflow, and the global scope of the module is equivalent to the global scope of the workflow. We could treat it a bit like |
Beta Was this translation helpful? Give feedback.
-
From discussion
The current approach to define workflow inputs is to use global variables
as shown in the Parameters help section - one may intuitively expect to define workflow input by
defining global variables and passing them as arguments to tasks, e.g.
The produced output reads
Currently the only intended way of defining workflow input is using global
variables.
Proposal
encapsulation and the very idea behind a function, i.e. that a function should be a stateless and entirely
encapsulated entity whose result should only depend on the explicit input
Beta Was this translation helpful? Give feedback.
All reactions