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.
-
-
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
I watched those fairly carefully, then we found some reverse engineering work such as https://kateinoigakukun.hatenablog.com/entry/2019/06/09/081831 …. I'm actually trying to understand it pretty deeply :)
1 reply 0 retweets 2 likes -
Replying to @raphlinus
@jsh8080 might be able to help you with questions.1 reply 0 retweets 0 likes -
If you weren't trying to make state/binding look as transparent/magical, you could replace them with less magical things that were more explicitly functional, where the `State`/`Binding` itself is an opaque handle which action values can build up around, like Elm
1 reply 0 retweets 0 likes -
raph this is a much better explanation than the one i gave you for the state approach in moxie, re https://moxie.rs/target/doc/moxie/struct.Key.html …
1 reply 0 retweets 3 likes -
Thanks. I had the good fortune of reading through that after watching a couple Jetpack Compose videos, and now I feel it clicks - seems like your "topo" is very similar to @Composable.
1 reply 0 retweets 1 like -
yeah, leland and i have been nerd sniping each other for a while too
1 reply 0 retweets 1 like -
Replying to @__anp__ @raphlinus and
the key difference there comes down to the use of hashable ids in topo (and absence of a compiler plugin) vs a structural approach based on the layout of the composition buffer iiuc
1 reply 0 retweets 1 like -
Replying to @__anp__ @raphlinus and
what bad form to not ping
@intelligibabble1 reply 0 retweets 1 like
Clearly the compiler plugin makes a huge difference for ergonomics, so interesting to see what can be done in Rust space. Very clever callsite id using ordinary macros, and proc macros might do even more, though I see it's tricky.
-
-
Replying to @raphlinus @jckarter and
indeed! i've been making progress on implementing https://github.com/rust-lang/rust/issues/47809 …, which i'm fairly confident will let me eliminate the macros from topo. down to a couple of llvm errors and i should be able to prototype it.
1 reply 0 retweets 1 like -
Replying to @__anp__ @raphlinus and
even with that, the main win of the compiler plugin iiuc is static typing for the implicitly propagated composer type, so you can e.g. determine whether you're in an android or skia context and fail compile if you emit the wrong nodes
2 replies 0 retweets 0 likes - 16 more replies
New conversation -
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.