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
Ben Kreeger
December 05, 2014
Programming
0
63
Swift vs. Objective-C
Not really an epic battle.
Ben Kreeger
December 05, 2014
Tweet
Share
More Decks by Ben Kreeger
See All by Ben Kreeger
Factory Girl
kreeger
0
76
Liberty STEM App Camp introduction
kreeger
0
95
Other Decks in Programming
See All in Programming
MLH State of the League: 2026 Season
theycallmeswift
0
200
コンテキストエンジニアリング Cursor編
kinopeee
1
730
UbieのAIパートナーを支えるコンテキストエンジニアリング実践
syucream
2
790
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
210
AI時代のドメイン駆動設計-DDD実践におけるAI活用のあり方 / ddd-in-ai-era
minodriven
25
9.5k
Improving my own Ruby thereafter
sisshiki1969
1
140
Vue・React マルチプロダクト開発を支える Vite
andpad
0
110
Honoアップデート 2025年夏
yusukebe
1
880
【第4回】関東Kaggler会「Kaggleは執筆に役立つ」
mipypf
0
980
Google I/O recap web編 大分Web祭り2025
kponda
0
2.9k
SOCI Index Manifest v2が出たので調べてみた / Introduction to SOCI Index Manifest v2
tkikuc
1
110
Nuances on Kubernetes - RubyConf Taiwan 2025
envek
0
220
Featured
See All Featured
Facilitating Awesome Meetings
lara
55
6.5k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
4 Signs Your Business is Dying
shpigford
184
22k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
A Modern Web Designer's Workflow
chriscoyier
696
190k
Fireside Chat
paigeccino
39
3.6k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
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.