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
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
ふつうのFeature Flag実践入門
irof
8
4.2k
JavaDoc 再入門
nagise
1
430
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.5k
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
310
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
130
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.6k
これからAgentCoreを触る方へトレンドはGatewayです
har1101
5
430
さぁV100、メモリをお食べ・・・
nilpe
0
160
1B+ /day規模のログを管理する技術
broadleaf
0
120
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.8k
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
250
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
360
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Optimizing for Happiness
mojombo
378
71k
We Are The Robots
honzajavorek
0
260
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Producing Creativity
orderedlist
PRO
348
40k
Paper Plane
katiecoart
PRO
1
52k
The Spectacular Lies of Maps
axbom
PRO
1
830
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
330
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
540
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
480
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.