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
57
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
69
Liberty STEM App Camp introduction
kreeger
0
84
Other Decks in Programming
See All in Programming
PHPはいつから死んでいるかの調査
chiroruxx
2
430
Revisiting the Hotwire Landscape after Turbo 8 @ RailsConf 2024, Detroit
marcoroth
0
390
Effectで作る堅牢でスケーラブルなAPIゲートウェイ / Robust and Scalable API Gateway Built on Effect
yasaichi
3
290
ペパボOpenTelemetry革命
pyama86
2
180
Scalable Customer Journey Orchestration (CJO)
lewuathe
0
450
検証も兼ねて個人開発でHonoとかと向き合った話
hanetsuki
1
1.4k
Open AI APIを使う前に知っておきたいアカウントTier の話
akki_megane
0
110
『Railsオワコン』と言われる時代に、なぜブルーモ証券はRailsを選ぶのか
free_world21
2
410
効率化に挑戦してみたらモバイル開発が少し快適になった話
ryunakayama
0
140
Domain-Driven Transformation
hschwentner
2
1.5k
Anthropic Cookbook のおすすめレシピ
schroneko
7
1.4k
From Spring Boot 2 to Spring Boot 3 with Java 21 and Jakarta EE
ivargrimstad
0
910
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
457
32k
The Straight Up "How To Draw Better" Workshop
denniskardys
228
130k
Making the Leap to Tech Lead
cromwellryan
125
8.5k
Writing Fast Ruby
sferik
622
60k
Docker and Python
trallard
35
2.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
22
1.4k
Happy Clients
brianwarren
92
6.4k
Creatively Recalculating Your Daily Design Routine
revolveconf
211
11k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
51k
Git: the NoSQL Database
bkeepers
PRO
423
63k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
41
4.4k
The MySQL Ecosystem @ GitHub 2015
samlambert
244
12k
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.