~/talk

Swift 5’s brand new Result Type

Talkat iOS Conf Singapore 2019 · on Saturday, 2019-01-19· [swift, developer-experience]
slides:none on file

Demo code shows Swift 5 adds an official Result type in Swift 5 that unifies success and failure into a single return type, with failure constrained to failure: Error-constrained values. Examples build doubled/plusOne functions, a pipe operator, and custom map and flatMap implementations to chain results without crashes or nested wrappers. Claim: it behaves like optionals for chaining but preserves error detail so try/catch decisions can be deferred; the stdlib version actually lands and works.

AI-written summary · about

  1. 0:00Start
  2. 1:57Approach Using Url Session
  3. 3:29Fatal Error
  4. 7:36Fatal Errors
  5. 7:57Optionals
  6. 10:31Map Operator
  7. 18:23Result Type
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.