that doesn't really help me much unfortunately. Th...
# functional
t
that doesn't really help me much unfortunately. The caster course is just the basics of pure FP and the mobius architecture is just MVI with explicit effects, pretty much exactly what I have right now. But it doesn't scale well (especially not without lenses) and he failed to address all the interesting problems. For example: What happens when the model is currently set to loading but the process is killed? Without ever having used their app I can rather confidently say that it will either load indefinitely or not restore at all (like in Hannes Dorfmann's MVI) because he didn't mention the problem of implicit state in rx streams (in this case the state of the network request existing, which should eventually fire a
LoadingSuccess
or
LoadingFailed
event). What happens when the activity is not attached while a
LoadingFailed
event triggers an
Effect
to show a toast? It will be lost because they do not queue effects. Furthermore, their architecture works only on a single level, it is not fractal. As soon as you deal with nested components like app wide state shared with services, complex views or fragments, you have to synchronize state and things start falling apart (see https://hackernoon.com/the-importance-of-state-ownership-in-elm-72f711ceb244). Compile time safety is also mostly an illusion: handling of effects can not be easily checked for exhaustion and the state machine is rarely complete which makes the reducer function actually impure through exceptions. Maybe what I'm envisioning is simply not feasible on android