Elektrine lite

← Feed

@helge@mastodon.social

Post #2560390

2026-05-11 21:25 UTC

People often complain about some SwiftUI bugs, lack of feature XYZ and such. But I think they often miss the structurally deep / conceptual issues. Like how many instance methods does `View` have? Something like 500+?

Replies (4)

  • @helge@mastodon.social 2026-05-11 22:38

    I think I even have an API-OKayish, essentially 0-cost abstraction for dealing with the issue. Like why is it `view.chartZAxisLabel` (and all variants). Instead use small trampolines, like `view.chart.z.axis.label`, `chat.z.axis { ... }` etc. Would have the same shape for all axis.

    Open ##3039341

  • @david@tnku.co 2026-05-11 21:59

    @helge@mastodon.social Agreed. Some of them apply to one specific view type, but are hard to find because they exist in this soup. Some apply to multiple types of views, but have slightly different effects. And sometimes, different views will have different modifiers to do the same thing.

    Open ##3039342

  • @fds@mastodon.social 2026-05-11 22:10

    @helge@mastodon.social 236 including the deprecated ones if the documentation is showing me all of them. In some ways I think the worst problem is it was released with very few features while also it feeling like they were deciding how it should work. Now you do often find these long lists of functions all around the documentation but many of them can be deprecated so space isn't even wasted on meaningful information.

    Open ##3039343

  • @ffried@mastodon.social 2026-05-12 07:14

    @helge@mastodon.social I still don’t understand why they didn’t group related stuff into methods. Like: view .chart { c in c.xyz().abc() } .accessibility { a in a.blah().blup() } Probably because it’s harder to explain the (already hard to understand) rules of what modifier affects what target.

    Open ##3039344