Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Swift vs. Objective-C
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
84
Liberty STEM App Camp introduction
kreeger
0
99
Other Decks in Programming
See All in Programming
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
570
最近”作らせてる” ローカルAIアプリの話
akit37
0
450
sbt 2.0: takeoff
eed3si9n
0
150
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
490
Jetpack Compose Mechanisms
skydoves
2
720
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
140
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
330
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
990
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
プロダクトコードからライブラリの境界を見つける
elmetal
PRO
0
110
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
96
6.9k
Test your architecture with Archunit
thirion
2
2.4k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
280
Optimising Largest Contentful Paint
csswizardry
37
4k
The untapped power of vector embeddings
frankvandijk
2
1.9k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.1k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
270
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
For a Future-Friendly Web
brad_frost
184
10k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
980
Paper Plane (Part 1)
katiecoart
PRO
2
11k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
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.