2026-07-06 16:00 UTC
I wish Swift had a way to explicitly shadow certain type names from frameworks. #SwiftUI claims names List, Table (and now Documents as of iOS 27 beta 2) for types that we never use so we end up prefixing every with Linear all the time.
Replies (4)
-
@joe@f.duriansoftware.com 2026-07-06 16:05
@dlx@mastodon.social declarations in your own module are supposed to win over ones imported from elsewhere. would a top-level `typealias List = Linear.List` in your file let you avoid qualifying the name everywhere else?
-
@dlx@mastodon.social 2026-07-06 17:50
This post I brought to you by FinanceKit.Transaction https://developer.apple.com/documentation/financekit/transaction
-
@760ceb3b9c0ba4872cadf3ce35a7a4@wetdry.world 2026-07-06 16:07
@dlx@mastodon.social so if they add a type called Documents and you update your SDK it breaks existing code that uses that name? :P
-
@amyworrall@mastodon.social 2026-07-06 17:41
@dlx@mastodon.social maybe we should get into the habit of using a two or three letter prefix on all our classnames…