These are chat archives for jdubray/sam
@devinivy about function trees...
So I don't like that aspect:
Both Rxjs and Promises are about execution control, but neither of them have declarative conditional execution paths, you have to write an IF or SWITCH statement. With function tree you are able to diverge the execution down paths just as declaratively as functions. This helps readability.
A "Step" is action/model/state, inevitably function trees will be a spaghetti of actions/mode/state code, you just can't drive software engineering from an action perspective, that is the problem, not the solution
But, I like that one:
Rxjs and Promises are also based on value transformation. That means only the value returned from the previous function is available in the next. This works when you indeed want to transform values, but events in your application are rarely about value transformation, they are about running side effects and going through one of multiple execution paths. And that is where function-tree differs. It embraces the fact that most of what we do in application development is running side effects.
It embraces the fact that most of what we do in application development is running side effects. is wishful thinking at that point... Function Trees need SAM ...
nap()-- although it can still be there, in some situations it's not really needed. Otherwise, I find the other principles highly valuable -- single source of truth, views as functions of the model, clear separation of model mutation.