Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
A Swift Introduction To Swift
Search
Neil Kimmett
August 22, 2016
Technology
0
110
A Swift Introduction To Swift
Given at Codebar August 2016
https://codebar.io/meetings/monthly-aug-2016
Neil Kimmett
August 22, 2016
Tweet
Share
More Decks by Neil Kimmett
See All by Neil Kimmett
Scaling your app's release process
neilkimmett
0
260
React Native in a native world
neilkimmett
0
250
React Native on tvOS
neilkimmett
0
2.1k
Contributing to Swift
neilkimmett
0
78
Contributing to Swift
neilkimmett
0
59
A Swift introduction
neilkimmett
0
160
Writing Swift
neilkimmett
0
350
Practical WatchKit
neilkimmett
0
330
So you want to make an Apple Watch app?
neilkimmett
0
180
Other Decks in Technology
See All in Technology
Datadog の RBAC のすべて
nulabinc
PRO
3
450
Security Diaries of an Open Source IAM
ahus1
0
210
アーキテクチャモダナイゼーションを実現する組織
satohjohn
0
430
Claude Code Skills 勉強会 (DevelersIO向けに調整済み) / claude code skills for devio
masahirokawahara
1
17k
非情報系研究者へ送る Transformer入門
rishiyama
11
7.3k
us-east-1 に障害が起きた時に、 ap-northeast-1 にどんな影響があるか 説明できるようになろう!
miu_crescent
PRO
13
4.2k
(Test) ai-meetup slide creation
oikon48
1
310
SRE NEXT 2026 CfP レビュアーが語る聞きたくなるプロポーザルとは?
yutakawasaki0911
1
250
Scrumは歪む — 組織設計の原理原則
dashi
0
140
AIエージェント、 社内展開の前に知っておきたいこと
oracle4engineer
PRO
2
110
銀行の内製開発にて2つのプロダクトを1つのチームでスクラムしてみてる話
koba1210
1
110
楽しく学ぼう!コミュニティ入門 AWSと人が つむいできたストーリー
hiroramos4
PRO
1
190
Featured
See All Featured
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.1k
Leo the Paperboy
mayatellez
4
1.5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
290
Claude Code のすすめ
schroneko
67
220k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
210
Building AI with AI
inesmontani
PRO
1
790
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Test your architecture with Archunit
thirion
1
2.2k
Docker and Python
trallard
47
3.8k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
480
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.1k
Transcript
A Swift Introduction To Swift by @neilkimmett
Swift is a type safe language
Types Javascript "1" + 2 = "12" Ruby x =
5 x = "a string" x = Dog.new
Types Swift "1" + 2
Types Swift var x = 5 x = "a string"
Types let number: Int = 2 let name: String =
"Sup Codebar" let primes: [Int] = [2, 3, 5, 7, 11] let view: UIView = UIView() view.backgroundColor = UIColor.whiteColor()
✨ Type inference ✨ let number = 2 let name
= "Sup Codebar" let primes = [2, 3, 5, 7, 11] let view = UIView() view.backgroundColor = .whiteColor()
Constants & variables let words = "Hello, there" words =
"Bye for now"
Constants & variables let words = "Hello, there" words =
"Bye for now"
Constants & variables let words = "Hello, there" words =
"Bye for now"
Constants & variables var words = "Hello, there" words =
"Bye for now"
Functions func multiply(array: [Int], by: Int) -> [Int]
Functions func multiply(array: [Int], by: Int) -> [Int] { var
result = [Int]() for x in array { result.append(x * by) } return result }
Functions func multiply(array: [Int], by: Int) -> [Int] { return
array.map({ (x) -> Int in return x * by }) }
Functions func multiply(array: [Int], by: Int) -> [Int] { return
array.map { $0 * by } }
Functions func multiply(array: [Int], by: Int) -> [Int] { return
array.map { $0 * by } } multiply(array: numbers, by: 2)
Classes class Counter { private var count = 0 func
increment() { count += 1 } } let counter = Counter() counter.increment()
Optionals?!
Optionals class Codebar { var location: String = "Pivotal Labs,
EC1V 9NR" } let codebar = Codebar() // insert lots of awesome talks here codebar.location = "The pub" // insert lots of inspiring conversations here codebar.location = nil !
?
Optionals class Codebar { var location: String? = "Pivotal Labs,
EC1V 9NR" } let codebar = Codebar() // stuff codebar.location = nil !
Other super awesome stuff • structs • enums • protocols
• generics • frameworks
Further reading • "The Swift Programming Language" by Apple •
raywenderlich.com • swift.org • WWDC videos • IBM Swift Sandbox • Swift Playgrounds for iPad on iOS 10
Thanks ! @neilkimmett "
[email protected]
# kimmett.me