Comment by mpweiher

15 days ago

> but when I see the creators of a system I trust basically deprecate it,

What makes you think I trust Apple? So yes, that's very much a "you thing".

And SwiftUI is laughably bad. And my very early criticisms of Swift, for example, have panned out precisely as I predicted.

> > Every UI is always some mapping of the state.

> but it previously wasn't described as such.

Yes it was. Except this was seen as the obvious given that it is. Because, once again, a UI that is not a function (mapping) of the model is not a UI.

"In Smalltalk-80, a view is just a visual representation of a model" -- https://en.wikipedia.org/wiki/Model–view–controller#View

> IIRC, at the time, MVC had a common problem of controller bloat,

Nope. Non-MVC implementations had the problem of controller bloat, because they didn't actually implement MVC.

> the render function of the component is a 100% pure function of the state that the framework injects.

Except, as I've correctly pointed out: it's not.

[Advantages]

None of this is in any way specific ("The compiler". Seriously?) or clearly an advantage that can be tied to this type of framework. So yes: you're not even close to convincing me. Because there's no "there" there.

> the reason why this post rubs me the wrong way, is that you took a theoretical design document, misunderstood it for the actual, practical implementation

You misunderstood the post. Completely. The document claims "pure function". This is laughably false. The question is what is left when you remove "pure" from "pure function". And the answer to that is: nothing.

That doesn't mean there are no benefits, but the benefits cannot be "what you get from being a 100% pure function", because it ain't.

Just like the benefit of butter can't be "it's 100% fat free". Because it ain't.

And if you keep insisting that those are the benefits, then I don't know how to help you.

And again, it doesn't mean there are no benefits, but they are both smaller than and quite different from what you claim. And with the benefit being fairly small, the other question is what the cost is of pretending this is so when it is not. And the answer is: pretty high.

And it's funny that on the one hand you go with the same "well, you're taking the "100% pure" thing too literally", when just a few lines above, you yourself made "100% pure function" the defining characteristic.

So which is it? Make up your mind. It appears to be Schröding-important.

Any UI that actually is a UI is some sort of function of the state. Otherwise it is not a UI but random graphics and/or decoration.