David Beck :xcode: on Nostr: I think I just realized when Swift's type system goes from helpful to hurtful: when ...
I think I just realized when Swift's type system goes from helpful to hurtful: when it stops being self documenting.
For instance, with a UILabel you can look at the type and know exactly what you can do with it. It has a lineBreakStrategy property, so you know that can be customized.
On the other hand, SwiftUI Text has almost no properties outside of what it inherits from View. So like a giant box of legos, you have to go searching for the modifiers that apply to Text.
For instance, with a UILabel you can look at the type and know exactly what you can do with it. It has a lineBreakStrategy property, so you know that can be customized.
On the other hand, SwiftUI Text has almost no properties outside of what it inherits from View. So like a giant box of legos, you have to go searching for the modifiers that apply to Text.