Although the signs were out there in the open, the introduction of Swift was one of the big surprises of WWDC 2014. In this talk, I've outlined the reasonings why a 30yo language is being phased out and the main improvements introduced in Swift as well as Xcode 6.
4. An Android, an iOS, a Blackberry and a
Windows Mobile developer walk into a barâŠ
CuriosMinds, Brasov, Sept 18th 2014 Slide 3
5. An Android, an iOS, a Blackberry and a
Windows Mobile developer walk into a barâŠ
The barman looks at them & saysâŠ
CuriosMinds, Brasov, Sept 18th 2014 Slide 3
6. An Android, an iOS, a Blackberry and a
Windows Mobile developer walk into a barâŠ
The barman looks at them & saysâŠ
Gee, it must be in town
CuriosMinds, Brasov, Sept 18th 2014 Slide 3
7. Swift & iOS
Paul Ardeleanu
pa@h24.io
@pardel
Copyleft 2014 me
8. To swiftly go where no
other language has
gone before
42. ⣠maximise the number of developers
CuriosMinds, Brasov, Sept 18th 2014 Slide
⣠keeping existing developers happy
31
2 more thingsâŠ
43. ⣠30 year old language
⣠drastically different from other languages
⣠not entirely future-proof
CuriosMinds, Brasov, Sept 18th 2014 Slide
32
Objective-C
66. CuriosMinds, Brasov, Sept 18th 2014 Slide 4 3
Tuples
let http404Error = (404, "Not Found")
let x = 1
let y = 2
let point = (x, y)
67. CuriosMinds, Brasov, Sept 18th 2014 Slide 4 3
Tuples
let http404Error = (404, "Not Found")
let x = 1
let y = 2
let point = (x, y)
point.0
68. CuriosMinds, Brasov, Sept 18th 2014 Slide 4 3
Tuples
let http404Error = (404, "Not Found")
let x = 1
let y = 2
let point = (x, y)
point.0
let origin = (x: 200, y: 100)
origin.y
105. Module 01 Slide 6 2 Hello24 Ltd. (c) 2014
REPL
Readâevalâprint loop
$ which swift
/usr/bin/swift
106. Module 01 Slide 6 2 Hello24 Ltd. (c) 2014
REPL
Readâevalâprint loop
$ which swift
/usr/bin/swift
$ swift -v
Swift version 1.0 (swift-600.0.51.3)
Target: x86_64-apple-darwin14.0.0
<unknown>:0: error: the SDK 'MacOSX10.9.sdk' does not
support Swift
114. Module 01 Slide 6 5 Hello24 Ltd. (c) 2014
REPL
$ swift -v
Swift version 1.1 (swift-600.0.54.4)
Target: x86_64-apple-darwin14.0.0
/Applications/Xcode-Beta.app/Contents/Developer/usr/bin/lldb "--repl=-target
x86_64-apple-darwin14.0.0 -target-cpu core2 -sdk /Applications/Xcode-
Beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
MacOSX10.10.sdk -color-diagnostics"
115. Module 01 Slide 6 5 Hello24 Ltd. (c) 2014
REPL
$ swift -v
Swift version 1.1 (swift-600.0.54.4)
Target: x86_64-apple-darwin14.0.0
/Applications/Xcode-Beta.app/Contents/Developer/usr/bin/lldb "--repl=-target
x86_64-apple-darwin14.0.0 -target-cpu core2 -sdk /Applications/Xcode-
Beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
MacOSX10.10.sdk -color-diagnostics"
$ swift
Welcome to Swift! Type :help for assistance.
116. Module 01 Slide 6 6 Hello24 Ltd. (c) 2014
REPL
$ swift
Welcome to Swift! Type :help for assistance.
1> 1 + 2
$R0: Int = 3
2> "once upon a time"
$R1: String = "once upon a time"
3> $R1 + " there were ($R0) bears"
$R2: String = "once upon a time there were 3 bears"
4> println($R2)
once upon a time there were 3 bears
118. ⣠iOS 8 released yesterday
⣠Swift is v.1.0 as of Sept 9th
⣠Xcode 6.0.1 released yesterday
⣠Apps written in Swift started being accepted on Sept 9th
CuriosMinds, Brasov, Sept 18th 2014 Slide
68
Now!