In the Elm architecture, where the idea of “views are functions of state” comes from, you get language level support that guarantees you can’t perform arbitrary effects. Swift, on the other hand, is not a “truly functional” language. You can accidentally perform some effect inside a transaction, which leads to undefined behavior. Don’t get me wrong, I’m not saying being “truly functional” is inherently right or wrong. I’m talking about the dynamic between the language and the framework.