Swift delight: no unused results by default. That is, when you call a function in Swift, you get a warning if you don’t use (or explicitly discard) the result.
— Jordan Rose (@UINT_MIN) November 30, 2021
Part of the Swift Regrets series.
Swift delight: no unused results by default. That is, when you call a function in Swift, you get a warning if you don’t use (or explicitly discard) the result.
— Jordan Rose (@UINT_MIN) November 30, 2021
Part of the Swift Regrets series.
Swift regret: no open protocols
— Jordan Rose (@UINT_MIN) November 24, 2021
Sometimes you have a protocol that only makes sense for types in your module to conform to, but that you want to have as a generic constraint. “PropertyList” is a good example. Someone else cannot just make a new plist type.
Part of the Swift Regrets series.
Swift regret: retroactive conformances
— Jordan Rose (@UINT_MIN) November 21, 2021
These are when you have a type Foo from module A, and a protocol Bar from module B, and you need Foo to conform to Bar. And so you say `extension Foo: Bar`.
Part of the Swift Regrets series.