Consider executeIntent and executeAction in DSL
arkivanov opened this issue · 1 comments
arkivanov commented
Consider executeIntent and executeAction in DSL
arkivanov commented
After some digging and experimenting, there some downsides:
- The ability to execute Intents and Actions from DSL handlers would make the API more complex. E.g.
CoroutineExecutorScope
andReaktiveExecutorScope
would receive two additional type parameters -Intent
andAction
. - Currently the data flow in DSL-based code is kinda uni-directional. E.g. handlers have
Intent
andAction
as inputs, andMessage
andLabel
as output. The ability to executeIntents
andActions
from DSL handlers would add some mess -Intents
andActions
are inputs and outputs at the same time. This doesn't look clean.
It's advised to extract common methods, as demonstrated in the sample.