~/talk

Rubyist meets Swift

Talkat Ancient City Ruby 2015 · 2015-03-25..03-27· [swift, ruby]
name:Jay Hayes
links:none on file
slides:none on file

Compares Ruby idioms to concrete Swift code: shows how Swift handles variables/constants, optionals and the coalescing operator, external vs internal parameter names for keyword-like args, closures as map callbacks, and using extensions to make Ints usable in conditionals. Builds a working dictionary fetch implementation that accepts a key, optional default or default-producing closure and calls fatalError on missing keys (no exceptions in Swift). Notes Swift betas change syntax quickly.

AI-written summary · about

  1. 0:00Start
  2. 2:38variable
  3. 3:14allows mutation
  4. 3:30constant
  5. 4:01prevents mutation
  6. 4:30type safe
  7. 5:05type inference
  8. 7:24optionals?
  9. 11:29external parameters
  10. 13:34closures
  11. 15:49function argument
  12. 17:52conditional
  13. 20:01Hash#fetch
  14. 22:47var dict = ["one" : 1] // Dictionary
  15. 23:43method params
  16. 26:49fatalError("Key (key) not found.")
~/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.