Thus ends five months of Swift regrets (and delights), things that I had been collecting during my last year at Apple…and things that came up during the ensuing discussion on Twitter. I wanted to talk about these things because every project learns from those that came before it, and that should include both the good parts and the bad parts. I have a memory of my former colleague Joe Groff saying that we should normalize and encourage talking about mistakes and missteps in our field, and so this is a contribution.
Swift History: Assignment Methods
To finish out the series I’m going to talk about something that’s neither a regret nor a delight, but a feature that wasn’t right for Swift at all: assignment methods
— Jordan Rose (@UINT_MIN) December 30, 2021
Part of the Swift Regrets series.
Swift Regret: inout Syntax
Swift regret: inout syntax
— Jordan Rose (@UINT_MIN) December 28, 2021
Swift has a notion of inout parameters, which are formally copy-in/copy-out (or perhaps move-in/move-out), and optimized to by-ref when possible. This is written `inout Foo` in the parameter type…and `&foo` at the call site.
Part of the Swift Regrets series.
Older Posts
- 2021-12-26 Swift Delight: Optional Conveniences
- 2021-12-23 Swift Regret: try?
- 2021-12-21 Swift Delight: try
- 2021-12-17 Swift Regret: Operator Function Lookup Rules
- 2021-12-15 Swift Regret: "Double" rather than "Float64"
- 2021-12-10 Swift Delight: Implicit Member Syntax
- 2021-12-08 Swift Regret: Weak Vars in Structs
- 2021-12-03 Swift Regret: Lazy Vars in Structs
- 2021-11-30 Swift Delight: No Unused Results
- 2021-11-24 Swift Regret: Open Protocols
- 2021-11-21 Swift Regret: Retroactive Conformances
- 2021-11-18 Swift Delight: Library Evolution
- 2021-11-10 Swift Mangling Regret: Private Discriminators
- 2021-11-05 Swift Mangling Regret: The "Old" Mangling
- 2021-11-03 Swift Mangling Regret: Library Evolution
- 2021-10-29 Swift Delight: #available
- 2021-10-22 Swift Regret: Implicitly-Hashable Payloadless Enums
- 2021-10-20 Swift Regret: Top-Level Decls in Script Mode
- 2021-10-15 Swift Delight: Names for Generic Parameters
- 2021-10-13 Swift Regret: Generic Parameters Aren't Members
- 2021-10-08 Swift Regret: OpaquePointer
- 2021-10-06 Swift Regret: Unannotated C Enums
- 2021-10-01 Swift Delight: Value Semantics Collections
- 2021-09-29 Swift Delight: guard
- 2021-09-24 Swift Regret: Inferred Property Types
- 2021-09-22 Swift Regret: Implicit Optional Initialization
- 2021-09-17 Swift Regret: Subscript Trailing Closures
- 2021-09-15 Swift Regret: Subscript Argument Label Rules
- 2021-09-10 Swift Regrets
- 2021-09-10 Swift Regret: Unapplied Instance Methods
- 2021-09-08 Swift Regret: Bound Methods
- 2021-08-29 Swift Regret: Type-based Overloading
- 2021-08-25 Swift Regret: AnyObject Dispatch
- 2021-08-20 Swift Regret: Labeled Tuple Elements
- 2021-08-18 Swift Regret: Tuples and Argument Lists
- 2021-08-13 Swift Regret: Sequence
- 2021-08-11 Swift Regret: mutating Protocol Methods vs. Classes
- 2021-08-06 Swift Regret: NSUInteger
- 2021-08-04 Swift Regret: Protocol Syntax