~/talk

A Funny Thing Happened On The Way To This Array

Talkat try! Swift NYC 2017 · 2017-09-05..09-06· [swift]
slides:none on file

Shows concrete ways to generate fixed‑count arrays (views, random numbers) and why common tricks fail: for‑loops and map work but map misuses the domain, Array.init(repeating:) duplicates the same instance, and a Swift Evolution proposal to accept a generator is rejected. Demonstrations include a constructible protocol to call zero‑arg initializers, an Int times operator and generator approaches using AnyIterator/Sequence, and a practical Array extension with generator that creates N distinct elements — code compiles and produces fresh instances per slot.

AI-written summary · about

  1. 0:00Start
  2. 2:55Iteration
  3. 4:12For Loop
  4. 4:43Map Function for the for Loop
  5. 16:40Sequences
  6. 19:07Swift Evolution
  7. 20:05Create Your Own Array Extension
~/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.