You Deserve Nice Things
summary
Gives a four‑rule checklist for when to extend system classes in Swift and shows concrete, working code: add eachPair to produce adjacent element pairs instead of zipping with dropFirst, implement all/any/none to remove double negations, provide a countWhere that avoids allocating intermediate arrays, overload numeric operators to multiply Int × CGFloat, and expose lazy reversed collections and a gestureRecognizer.cancel helper — each extension compiles, runs, and measurably reduces noise or allocations.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 0:50NSString
- 3:50ObjectiveC
- 5:18Swift
- 7:42Each Pair
- 11:59Numeric
- 20:29Optimizations
- 25:32Safety
- 34:05Ruby
related talks
21mOptimizing Swift code for separation of concerns and simplicity
20mHow Not to Write Swift
31mMaking the Most Out of Swift
20mExtending the Standard Library
57mSwift Tutorial - Exploring Swift Sequences in Depth
37mManaging Side Effects with Swift
20mSwift WTF: Weirdness, traps, and fixes
16mElements of Functional Programming
