3 ms·
I honestly don't know what you mean. The SwiftUI avocado toast example looks very similar to React but very different from e.g. Cocoa or Qt.
by pavlov 7y ago
I honestly don't know what you mean. The SwiftUI avocado toast example looks very similar to React but very different from e.g. Cocoa or Qt.
- chrismorgan 7y agoIt looks more like React than the likes of Cocoa and Qt, but if you’re comparing that aspect of its style then it looks like at least Vue, Ember and Svelte too. The way it works is very different, and the way it’ll make you write code is fairly different too, inasmuch as it essentially has its own layout and rendering model, and doesn’t use HTML and CSS. (SwiftWebUI renders to HTML, but being SwiftUI stuff it’s not using HTML simply rather than that being what you work with in your UI code; and styling works in a radically different way.)
- pavlov 7y agoReact is independent of layout and rendering models, it's not in any way tied to HTML or CSS. AFAICT the way SwiftUI works is basically the same as React.
- ch_sm 7y agoYou’re right in that it looks similar to React, but it is also true that this kind of API is (declarative component tree composition) now very wide-spread and popular, and React was not the first to implement or adopt it (I feel like the person referencing Qt maybe meant Qt Markup Language specifically). The way all of these frameworks differ from each other is both very slight in superficial details (think two-way binding or slots) and very, very strong in the basic implementation (i.e. the diffing or reconciliation algorithm). So, yes, a lot of these look similar these days. But saying that they work the same is oversimplification in my opinion.
- chrismorgan 7y agoWhen I referred to Qt I was meaning Qt in general, rather than QML. If you want a similar style of how you write code, then yes, QML is closer to this area than general Qt.
- chrismorgan 7y agoYes, React is nominally independent of HTML and is independent of CSS. SwiftUI is not independent of these things, but implements its own thing altogether.