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
Start using Swift.
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
DAloG
January 14, 2016
Programming
150
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Start using Swift.
DAloG
January 14, 2016
Transcript
39 slides
20.01.2016 Forget Objective-C. Start Swift. for Kharkiv Mobile Devs #15
Alexey Demedetskiy ✤ twitter: @DAlooG ✤ email:
[email protected]
✤ skype:
nobidon
Objective-C ✤ KVO/KVC ✤ UIKit ✤ Monolithic namespace ✤ Partially
defined behavior ✤ CoreData
Swift ✤ Closures ✤ Immutability ✤ Value types ✤ Generics
✤ Optionals
Swift ✤ Protocols ✤ Nested types ✤ Static ✤ Default
values ✤ Operators
How to Swift? ✤ Add Swift to existing project ✤
Start new project
Why? ✤ Strong types —> Less errors ✤ More instruments
—> Cleaner code ✤ Better syntax —> Easy to read and write
Optionals vs ‘nil’
nil ✤ [nil aMessage:@«text»] - ✅ ✤ [list addObject:nil] -
❌
Optional<T> ✤ T! ✤ T? ✤ T
Dirty Types ✤ UIKit ✤ External data (Network etc) ✤
Objective-C
How to clear types? ✤ as? : Any -> T?
✤ as! : Any -> T
None
None
None
WTF Immutability. ✤ Reference and Value types ✤ let -
immutable name ✤ var - mutable name
Struct trickery ✤ How many objects will be created? ✤
How many times `print` will write? ✤ What `t1.b` will print?
Struct trickery ✤ 0. There is no objects. ✤ 1.
✤ 4.
Class trickery ✤ How many objects will be created? ✤
How many times `print` will write? ✤ What `t1.b` will print?
Class trickery ✤ 1 ✤ 1 ✤ -1
let == const?
let == const?
Value types Pros ✤ Immutable. Even with `var` ✤ `init`
from compiler ✤ No inheritance
Properties ✤ no setter / getter methods. ✤ …unless `dynamic`
is specified ✤ `willSet` / `didSet` with references to new/old values ✤ `public private(set) var …` is ok
enum vs NS_ENUM
enum vs NS_ENUM
Shadow types!
None
None
When use enum? ✤ Flags ✤ States ✤ Options ✤
Shadow type
Alamofire vs AFNetworking
Namespaces ✤ Nested types ✤ Frameworks ✤ Targets
Nested types
Nested types
Nested types
Nested types
Nested types
let = vs dispatch_once
Outro ✤ Run away from Obj-C ✤ Build your own
logic modules ✤ Use Value Types ✤ Don’t use generics + inheritance + UIKit
More Decks by DAloG
See All by DAloG
State normalization (RU)
dalog
0
260
Redux + MQTT
dalog
1
840
От задач к проблемам
dalog
1
300
Unlimited power of Data-Driven UI
dalog
4
720
Data-Driven View Controllers. Tips and Tricks
dalog
5
2k
2 years of Redux in iOS. Lessons learned
dalog
0
440
Why unidirectional architecture matter for iOS.
dalog
1
350
Mobile backend without REST
dalog
2
160
Self managed teams 101
dalog
0
220
Other Decks in Programming
See All in Programming
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
4
1.5k
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
310
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
330
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
330
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.7k
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
5.6k
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
200
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
260
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
350
オーケストレーション記述言語 Katari
yukikurage
0
250
GraphQL の onError と Nullability のこれから
quramy
0
210
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
2
140
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
We Are The Robots
honzajavorek
0
440
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
460
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Code Reviewing Like a Champion
maltzj
529
40k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.4k
The browser strikes back
jonoalderson
0
1.9k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
460
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
630
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
470
Docker and Python
trallard
47
4.3k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k