Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
What's Up With Swift
Search
Mert Dumenci
December 14, 2014
Programming
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
What's Up With Swift
NSIstanbul Meetup 1.4
Mert Dumenci
December 14, 2014
Other Decks in Programming
See All in Programming
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
410
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
220
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
Event is what happens
moro
2
780
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
180
The Rails Doctrine Decade
koic
2
590
R8 の設定見直しでアプリサイズ削減
andpad
0
220
JIS keyboard support in Omarchy
lef237
0
110
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
190
Workers Cache を知る
syumai
0
360
Featured
See All Featured
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
480
Accessibility Awareness
sabderemane
1
250
ラッコキーワード サービス紹介資料
rakko
1
5.3M
Mind Mapping
helmedeiros
1
400
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Scaling GitHub
holman
464
140k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
A Soul's Torment
seathinner
8
3.8k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
340
It's Worth the Effort
3n
188
29k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
540
Transcript
What’s up with Swift? $ diff Objective-C Swift
“Objective-C without the C”
“Objective-C without the C” A new language
Objective-C is heavily influenced by Smalltalk Objective-C is based on
messaging Objective-C is reflective
Swift is not heavily influenced by Smalltalk Swift is not
based on messaging Swift is limited in reflection
<objc/runtime.h>
objc_msgSend
Objective-C is dynamic (fun!) and safe enough by design
Swift is static and safe by design
Objective-C relies on the runtime for a lot of things
This makes it flexible But also hard to statically analyse
Swift relies on the compiler for a lot of things
This makes it not so flexible But also easy to statically analyse
Swift is not just a changed syntax
It’s a philosophy change
Swift is safe
Swift is concise
Swift is multi paradigm
Objective-C nil eats messages
There’s usually no need for explicit value existence checks
If nil means non-existent, so how do you represent existent
keys with no value in hashes?
[NSNull null]
@property (nonatomic, retain) NSMutableArray *array; [self.array addObject:@1]; NSNumber *value =
self.array.firstObject; Why is value nil?
nil, NSNull, silent failure
Optionals
enum Optional<T> { case None case Some(T) }
None
None
None
Type inference
let name = “Mert" let cities = ["Istanbul": 14_160_167, "Copenhagen":
559_557, "Tokyo": 13_350_000] let image = UIImage(named: "NSIstanbul")
Generics
None
func map<T, U>(array: [T], transform: (T) -> U) -> [U]
Theorems for free! Philip Wadler
Mutability as a language feature
Value types
First class functions
Pattern matching
…and many more
Swift is modern
Thanks
@mertdumenci
A lot of this presentation is from Functional Programming in
Swift — read it!
Couple of things
Objective-C is still a super awesome language, and it’s not
going anywhere anytime soon. It’s still incredibly relevant.
Swift is a concise and clean language. This doesn’t mean
it’s similar to JavaScript in any way. Don’t write JavaScript in Swift.
Swift has a long way to go. If you need
good reliability, use Objective-C.