My #rust2020 blog: GUI and communityhttps://raphlinus.github.io/rust/druid/2019/10/31/rust-2020.html …
-
-
Replying to @raphlinus
SwiftUI is still immutable-value-oriented behind the scenes. Things like `Binding` are trying to provide an interface more familiar to imperative programmers, but aren't true references; writing to them queues up update actions that apply as part of the update cycle
1 reply 0 retweets 4 likes -
Replying to @jckarter
Interesting, and not surprising. Is there a good writeup on how this stuff works? To me, a lot of how SwiftUI works under the hood is just inscrutable magic.
1 reply 0 retweets 1 like -
Replying to @raphlinus
There are last WWDC's videos, like https://developer.apple.com/videos/play/wwdc2019/226/ … and https://developer.apple.com/videos/play/wwdc2019/216/ …, but not much beyond that, unfortunately
2 replies 0 retweets 0 likes -
Replying to @jckarter @raphlinus
From the perspective of Rust, the way SwiftUI propagates type information to establish the static view graph and simplify the diffing problem seems directly applicable to Rust, since it has a lot of the same sugar (`impl View` instead of `some View`) already
2 replies 1 retweet 0 likes -
Replying to @jckarter
So in druid we use https://docs.rs/druid/0.3.1/druid/trait.Data.html … for this, and I think it's broadly similar to what you describe. But, since this is Twitter, now I'm going to say something controversial.
1 reply 0 retweets 1 like -
Replying to @raphlinus @jckarter
I think this model of making something look simple (this is just a reference to some data) and making it do something really complex and sophisticated behind the scenes is dangerous. It works well for small examples, but when things go wrong they can go really wrong.
2 replies 0 retweets 1 like -
Replying to @raphlinus @jckarter
The new druid reactive model was *very* strongly influenced by SwiftUI, but, fun fact, the dev branch was called "muggle" as a direct reference to how much hidden magic there is in SwiftUI.
1 reply 0 retweets 1 like -
Replying to @raphlinus @jckarter
Sophisticated things can happen in druid too, but it's explicit - to do the same kinds of things as KeyPaths and Bindings, you do a Haskell-style lens. This maybe doesn't *look* familiar to many programmers, but at least it's pretty clear what's actually going on.
2 replies 0 retweets 1 like -
Replying to @raphlinus
Well, KeyPaths *are* just lenses with a funny name (and an equality condition you can take or leave)
1 reply 0 retweets 2 likes
*grin* I'm sure by the time we're done, a category theorist will write a blog post (or a paper) putting forth an isomorphism between the SwiftUI and druid reactive models.
-
-
Replying to @raphlinus @jckarter
@_julesh_, there's an interesting challenge here!0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.