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
Swift vs. Objective-C
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Ben Kreeger
December 05, 2014
Programming
70
0
Share
Swift vs. Objective-C
Not really an epic battle.
Ben Kreeger
December 05, 2014
More Decks by Ben Kreeger
See All by Ben Kreeger
Factory Girl
kreeger
0
82
Liberty STEM App Camp introduction
kreeger
0
99
Other Decks in Programming
See All in Programming
分析エージェント精度向上における データアナリストの役割
oura_shoya
0
130
TypeSpec で繋ぐ複数プロダクトの型安全
maroon8021
1
260
Zod v4 Codec でスキーマに型変換を埋め込む REST API 設計 #TSKaigi2026
ryutaro_yako
0
160
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.2k
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
220
JavaDoc 再入門
nagise
0
190
LLM Plugin for Node-REDの利用方法と開発について
404background
0
130
RTSPクライアントを自作してみた話
simotin13
0
300
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1.1k
OSもどきOS
arkw
0
260
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
650
~ 秘伝のタレ化した『神スプシ』と戦う ~ 関数型パラダイムで壊れない仕組みへ
h0r15h0
1
140
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
230
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
What's in a price? How to price your products and services
michaelherold
247
13k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
Why Our Code Smells
bkeepers
PRO
340
58k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Scaling GitHub
holman
464
140k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
150
How to Talk to Developers About Accessibility
jct
2
210
Designing Experiences People Love
moore
143
24k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
260
Transcript
SWIFT VS. OBJECTIVE-C THE EPIC BATTLE
OBJECTIVE-C: STILL REALLY FUN.
- (void)updateWithDictionary:(NSDictionary *)dictionary context:(NSManagedObjectContext *)context { [self.remoteToLocalAttributeMap each:^(NSString *remoteName, NSString
*localName) { id remoteValue = dictionary[remoteName]; if ([(NSNull *)remoteValue isEqual:[NSNull null]]) return; if (self.remoteDateFormats[remoteName]) { remoteValue = [NSDate dateFromString:remoteValue format:self.remoteDateFormats[remoteName]]; } [self setValue:remoteValue forKeyPath:localName]; }]; } (Yes, this is fun)
▸ Super dynamic ▸ Meta-programmable ▸ More mature ▸ Strong
ecosystem support
SWIFT IS PRETTY AWESOME.
private func createOrUpdateLocations(dicts: [NSDictionary]) -> [SaucerLocation] { let realm =
RLMRealm.defaultRealm() var locations = [SaucerLocation]() realm.transactionWithBlock() { for dict in dicts { var instance = SaucerLocation.findOrCreate(dictionary: dict, inRealm: realm) locations.append(instance) } } return locations }
▸ Type safety ▸ Generics ▸ Succinctness ▸ Beautiful "block"
syntax
OBJECTIVE-C: LIKELY NOT "THE FUTURE."
▸ Not going anywhere ▸ Not getting any better ▸
Solid, but stuck in the past
SWIFT: STILL WITH SOME WARTS.
▸ Compiler has a couple of bugs ▸ Works with
90% of UIKit/Foundation well ▸ CocoaPods support forthcoming ▸ Banner features still need some TLC
WHY CHOOSE?
SPOILER ALERT: YOU MIGHT NOT NEED TO
▸ Interoperability still an option, albeit tricky ▸ "Pure Swift"
projects are easiest to manage
BUT IF I HAD TO?
Learn Objective-C first, then Swift. Build a few Objective-C apps
first, then some Swift ones.
REALLY? NOT NECESSARILY.
If you're comfortable digging into Swift first, do it.
Objective-C is worth learning, even if it's not the future.