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
64
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
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
33k
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
3.4k
Claude Agent SDK を使ってみよう
hyshu
0
1.3k
Software Architecture
hschwentner
6
2.3k
Devvox Belgium - Agentic AI Patterns
kdubois
1
130
大規模アプリのDIフレームワーク刷新戦略 ~過去最大規模の並行開発を止めずにアプリ全体に導入するまで~
mot_techtalk
1
470
CSC305 Lecture 05
javiergs
PRO
0
220
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
180
PHPに関数型の魂を宿す〜PHP 8.5 で実現する堅牢なコードとは〜 #phpcon_hiroshima / phpcon-hiroshima-2025
shogogg
1
290
あなたとKaigi on Rails / Kaigi on Rails + You
shimoju
0
170
SwiftDataを使って10万件のデータを読み書きする
akidon0000
0
230
Cursorハンズオン実践!
eltociear
2
1.1k
Featured
See All Featured
Become a Pro
speakerdeck
PRO
29
5.6k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
The Invisible Side of Design
smashingmag
302
51k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
22k
The World Runs on Bad Software
bkeepers
PRO
72
11k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
KATA
mclloyd
PRO
32
15k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
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.