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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ben Kreeger
December 05, 2014
Programming
70
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
0
190
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.4k
Agentic UI
manfredsteyer
PRO
0
200
エージェンティックRAGにAWSで入門しよう!
har1101
9
1.8k
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
1
570
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
760
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
130
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
14
5.9k
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
220
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.6k
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
150
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
140
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
77
5.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
Designing Powerful Visuals for Engaging Learning
tmiket
1
430
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
210
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
290
It's Worth the Effort
3n
188
29k
Un-Boring Meetings
codingconduct
0
330
BBQ
matthewcrist
89
10k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
570
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.7k
The Cost Of JavaScript in 2023
addyosmani
55
10k
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.