OK. How do you express those effects as outputs in the interface?
Conversation
My point is exactly that _you don’t need to_. Why is it important? The effects are an implementation detail.
2
Trying to figure out how this is different from any object which performs effects when it e.g. receives a message.
2
Is the significant point that all endpoints are expressed via signal APIs rather than via methods?
1
Yes. Everything can be treated as a functional series of inputs to outputs. Embedded effects are encapsulated away.
2
1
Here’s one of my favorite examples: github.com/ReactiveCocoa/
I just embedded an animation effect, but it’s the same values.
1
2
Man, the embedding of effects makes me super duper uncomfortable. How do you test this stuff? Mocks?
1
Generally, we don’t test any of the effects themselves—they’re usually untestable things. The signals are still testable.
2
My concern is that there's tons of testable, pure behavior in github.com/ReactiveCocoa/ alongside untestable effects.
1
1
If you're actually practicing functional core, imperative shell, then it's easy to be sure you've tested all pure behavior.
1
1
Replying to
And impure behavior is obviously separated in a way which provides pressure for you to minimize it.
Replying to
e.g. looking at github.com/garybernhardt/, it's clear where "the danger zone"; any logic in the shell is a clear red flag

