~/talk

Lunch and Learn: Designing Overloaded and Custom Operators

Talkat Forward Swift 2017 · on Thursday, 2017-03-02· [swift]
links:none on file
slides:none on file

Argues that operator overloading must be reserved for well defined mathematical operations (string concatenation, dot product, matrix multiply) and that Swift requires declaring operator precedence and associativity for each operator. Warns that custom operators are possible (including many Unicode symbols) but are hard to discover and can break tooling; equality overloads must respect Equatable/Hashable invariants; warns that one can redefine existing operator meanings globally in Swift, which is legal but dangerously confusing.

AI-written summary · about

  1. 0:00Introduction by Stephen Kramer
  2. 1:04What is an operator
  3. 4:55Overloaded operators in Swift
  4. 8:57When to overload operators
  5. 13:28Equality and hashable protocols
  6. 14:33Custom operators in Swift
  7. 17:46Dangers of redefining operators
  8. 18:06Conclusion and Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.