Post AIytx8mFepJUUI7RE8 by krzyzanowskim@mastodon.social
(DIR) More posts by krzyzanowskim@mastodon.social
(DIR) Post #AIvGIZ2gcX3GO6aTJo by bigzaphod@mastodon.social
2022-04-28T22:48:56Z
0 likes, 0 repeats
I want to like SwiftUI but I constantly seem to need basic stuff it just doesn’t want to do like maintaining a List scroll position or whatever.
(DIR) Post #AIvGIaNde7PCXNOicC by shadowfacts@social.shadowfacts.net
2022-04-28T23:01:43.183387Z
0 likes, 0 repeats
@bigzaphod the more I use SwiftUI, the more I grow convinced that declarative-style UI frameworks are not fit for purpose. from a blog post I wrote last year:> To be clear, many of the issues I’ve encountered with SwiftUI are almost certainly bugs that will (hopefully) be fixed eventually. But where this differs from UIKit is that the architecture of UIKit lets you fix and workaround things yourself, whereas SwiftUI operates as a black box.https://shadowfacts.net/2021/swiftui/if the design of the API directly implies that something should possible, then it's more likely it will be possible out of the gate, rather than waiting for someone to go back and add additional API for it
(DIR) Post #AIvGlPigMR2hs7zG0u by bigzaphod@mastodon.social
2022-04-28T23:04:06Z
1 likes, 0 repeats
@shadowfacts I think I might agree despite how much I want it to work.
(DIR) Post #AIvH4jUx35tEiSmCw4 by shadowfacts@social.shadowfacts.net
2022-04-28T23:10:25.727804Z
0 likes, 0 repeats
@bigzaphod occasionally I'll get a glimmer of SwiftUI working as intended—like building a fairly complicated UI (nav hierarchy, lists with multiple cell types, searching) in a few hundred lines of code, or complicated data-flow stuff (state tracking on the Tusker compose screen)—and it feels wonderfuland then I try to do something that ought to be trivial and it's like running full speed into a brick wall
(DIR) Post #AIvRh95ZLpIwd6rLt2 by schwa@mastodon.social
2022-04-29T01:02:32Z
0 likes, 0 repeats
@bigzaphod @shadowfacts People dunking on swiftui .tumblr.comPlenty of swiftui software is shipping.
(DIR) Post #AIvRh9owd7bItq5ac4 by shadowfacts@social.shadowfacts.net
2022-04-29T01:09:25.339536Z
0 likes, 0 repeats
@schwa @bigzaphod oh, I ship software that uses SwiftUI too. when it works, I really enjoy it but the declarative-ness hinders me unfortunately often
(DIR) Post #AIxnCX4qhQRxMKFZg0 by goranmoomin@mastodon.online
2022-04-30T03:28:52Z
1 likes, 0 repeats
@shadowfacts @bigzaphod I argue that this is because SwiftUI tries to break itself away from the UIKit world — React succeeded because it *is* the DOM, just declarative; it has all of the raw HTML and CSS, the abstraction is thin, escape hatches are official, so mixing imperative code and declarative code feels natural and more abstractions can be built on top of it.
(DIR) Post #AIxnCYlmPINublLNEO by goranmoomin@mastodon.online
2022-04-30T03:31:40Z
1 likes, 0 repeats
@shadowfacts @bigzaphod Instead, SwiftUI adopted a whole new set of primitives that don’t mix with UIKit. Accessing the underlying UIView in a SwiftUI is discouraged and seen hacky, and wrapping up UIViews to use in SwiftUI feels like a feature for legacy code. SwiftUI should have been a much thinner wrapper on either UIKit or some new set of small imperative primitives, but it seems it’s a lost cause.
(DIR) Post #AIycg7eqrqtSs8xP96 by bigzaphod@mastodon.social
2022-04-30T04:04:03Z
0 likes, 0 repeats
@goranmoomin @shadowfacts SwiftUI even feels foreign to Swift itself, IMO. It really is a very closed off world.
(DIR) Post #AIycg8M6H3UL2HBwYa by arroz@mastodon.social
2022-04-30T04:42:59Z
1 likes, 0 repeats
@bigzaphod @goranmoomin @shadowfacts I still think they should have done AppKit/UIKit 2.0. Modernize it, adopt Swift properly, clean up the cruft that accumulated over time, integrate all the APIs properly (text size, accessibility etc) and ship it. SwiftUI seems like a mistake.
(DIR) Post #AIycgEybenr3ZRFmPQ by bigzaphod@mastodon.social
2022-04-30T04:47:26Z
1 likes, 0 repeats
@arroz @goranmoomin @shadowfacts I don’t know if SwiftUI is a mistake or just not done yet. I haven’t used it all that much, but when you do the stuff it’s good at it’s so impressive that you can’t help but root for it on some level. It’s just super frustrating to hit the extremely solid roadblocks.
(DIR) Post #AIytx73u2EFDASMVSi by krzyzanowskim@mastodon.social
2022-04-28T22:50:38Z
0 likes, 0 repeats
@bigzaphod easy things are easy, advanced are impossible.
(DIR) Post #AIytx7aW4yKenbcYIS by bigzaphod@mastodon.social
2022-04-28T22:51:10Z
0 likes, 0 repeats
@krzyzanowskim sounds about right.
(DIR) Post #AIytx89Fzo7aXLsIRk by Migueldeicaza@mastodon.social
2022-04-30T13:32:06Z
0 likes, 0 repeats
@bigzaphod @krzyzanowskim i think this is a function of its age, it is designed as a full wrapper, but not enough work has taken place to fulfill this vision. It is not even dealing with missing APIs, and lagging behind UIKit, but the programming model itself is not flushed enough to the point of being a sufficient replacement (ignoring bugs, that’s another source of pain)On the other hand, a lot of very tedious and obnoxious works is done beautifully.
(DIR) Post #AIytx8mFepJUUI7RE8 by krzyzanowskim@mastodon.social
2022-04-30T13:33:45Z
0 likes, 0 repeats
@Migueldeicaza @bigzaphod yea, then if UIKit started like that, with this limitation 3 years on the market, would it be still considered ok?
(DIR) Post #AIytx9WgsASaoJqWbw by Migueldeicaza@mastodon.social
2022-04-30T16:21:20Z
1 likes, 0 repeats
@krzyzanowskim @bigzaphod i think UIKit was a lot more limited 3 years in than SwiftUI is today. It is an expectation mismatch, and we expect a lot now.
(DIR) Post #APIMiwglzB0fXjaKSO by cocoaphony@mastodon.social
2022-04-30T11:15:55Z
0 likes, 0 repeats
@bigzaphod @arroz @goranmoomin @shadowfacts I haven’t used it much since v2, but those I work with that ship with it every day seem to love it, and have little desire to go back to UIKit.
(DIR) Post #APIMixfkKTmaaq71Um by OneSadCookie@mastodon.gamedev.place
2022-11-05T02:53:42Z
0 likes, 0 repeats
@cocoaphony @bigzaphod @arroz @goranmoomin @shadowfacts I love most things about SwiftUI. The vast majority of stuff is just better than UIKit, IME. Simple layouts are better, advanced layouts seem sorted now in iOS 16. I don't even have a strong opinion on the UIKit layering (though the poor interoperability is still a problem).For me, the problem with SwiftUI is that it insists on encoding the current whims of Apple's design language into the behavior. Sizes and spacing change from OS to OS.
(DIR) Post #APIMiy5ykwlZuCNyNs by OneSadCookie@mastodon.gamedev.place
2022-11-05T02:56:26Z
1 likes, 0 repeats
@cocoaphony @bigzaphod @arroz @goranmoomin @shadowfacts and that encoding of Apple's current design language is all implicit — it's very hard to know from looking at SwiftUI code whether you've actually managed to specify enough margins and paddings that your layout will continue to work well on future OSes.It *possibly* makes things slightly better for very small developers, happy enough to go with Apple's flow. But for anyone employing a designer, it's a disaster waiting to happen :/
(DIR) Post #APIMlm4DvwkZT8u1o0 by bigzaphod@mastodon.social
2022-11-05T03:08:46Z
0 likes, 0 repeats
@OneSadCookie @cocoaphony @arroz @goranmoomin @shadowfacts I also enjoy SwiftUI for the most part, but it does feel like the “magic” dial is set one or two ticks too high and it makes it just a bit more fragile than I’d like.
(DIR) Post #APIMlmRcWxSudhqiH2 by shadowfacts@social.shadowfacts.net
2022-11-05T13:45:14.140389Z
0 likes, 0 repeats
@bigzaphod @OneSadCookie @cocoaphony @arroz @goranmoomin apple: turning a big dial that says "Magic" on it and constantly looking back at the audience for approval like a contestant on the price is right
(DIR) Post #APIMmoh5eVrpuDZyGu by arroz@mastodon.social
2022-11-05T03:13:06Z
1 likes, 0 repeats
@bigzaphod @OneSadCookie @cocoaphony @goranmoomin @shadowfacts The big problem to me on the Mac is the layout system. I find auto layout extremely powerful and obvious, it fits the way I think about layout pretty well. SwiftUI, not really.
(DIR) Post #APIMuI3QtDqUzaaqsS by OneSadCookie@mastodon.gamedev.place
2022-11-05T03:19:52Z
0 likes, 0 repeats
@arroz @bigzaphod @cocoaphony @goranmoomin @shadowfacts "Autolayout" never sat well with me; "complex system of linear inequations" will never match my mental model. I've had far too many experiences where an entire nib had to have all constraints removed and recreated, because the system was impossible to understand or to incrementally alter, to be an advocate for that system.
(DIR) Post #APIMuJXxLDr7cXsk5o by OneSadCookie@mastodon.gamedev.place
2022-11-05T03:21:27Z
0 likes, 0 repeats
@arroz @bigzaphod @cocoaphony @goranmoomin @shadowfacts In general, SwiftUI's model fits my mental model pretty well. Things determine their own size; their parents determine their position.Pre-iOS16, though, there was no way to interact directly with the layout system, and that was a big problem if HStack/VStack weren't enough for your layout needs.iOS 16 seems to solve the problem neatly enough (the added API is exactly what I would've asked for), though I have yet to use it in anger...
(DIR) Post #APIMuJwlqxhmrVUYls by bigzaphod@mastodon.social
2022-11-05T04:22:05Z
1 likes, 0 repeats
@OneSadCookie @arroz @cocoaphony @goranmoomin @shadowfacts one major thing still missing with the new SwiftUI layout stuff are custom lazy layouts. I had to kind of fake them for our Wallaroo app.
(DIR) Post #APIcTTmAnd6onIl37w by amyworrall@mastodon.social
2022-11-05T12:13:33Z
0 likes, 0 repeats
@arroz @bigzaphod @OneSadCookie @cocoaphony @goranmoomin @shadowfacts That’s super interesting. I’ve always thought auto layout is the wrong abstraction level. I get it, to an extent, but it’s more low level than I want to work when writing a UI, and too high level to write the fundamentals of the layout engine I want.
(DIR) Post #APIcTUcdeZ4nQ1Iwu8 by arroz@mastodon.social
2022-11-05T14:09:53Z
1 likes, 0 repeats
@amyworrall @bigzaphod @OneSadCookie @cocoaphony @goranmoomin @shadowfacts I find it ideal. Fully declarative, just tell it what you want and it does that. I find it super weird that people now have to write imperative code in SwiftUI, a supposedly declarative framework, to build relatively simple layouts that can be done trivially using AutoLayout in a fully declarative way.
(DIR) Post #APJBlVo2OshSP0mbMu by OneSadCookie@mastodon.gamedev.place
2022-11-05T22:47:12Z
1 likes, 0 repeats
@shadowfacts @goranmoomin @arroz @bigzaphod @cocoaphony If only they cared about our approval 🤦♀️