3 ms·
> UIs aren't stateless i would agree that this is the traditional perspective. i'm not convinced this is necessarily the case; there may be other ways to look
by hnbroseph 11y ago
> UIs aren't stateless
i would agree that this is the traditional perspective.
i'm not convinced this is necessarily the case; there may be other ways to look at it. it could be that the ui "value" is the output of a series of functions, and that what might look like a "state" change is really a "new" ui being rendered.
(maybe this is what "frp" gives us, or perhaps "immediate mode gui" that sometimes pops up in game development circles; but i'm not very familiar with either.)
- dustingetz 11y agoIt is always the case. Even if you model app state in a functional way, the state is still somewhere, for example a haskell program may be pure but only because it pushed the unsafePerformIO call into the runtime. UIs always have additonal state that is not modeled in the backend, we can only reduce the surface area of code that is stateful, but we can't outright remove it, it is essential complexity in all UIs.