SlideShare a Scribd company logo
1 of 31
Download to read offline
@wolfgang_damm
Wolfgang Damm
CTO & Co-Founder
wolfgang@pocket-lifestyle.com
www.pocket-lifestyle.com
Swift
Should I use it for production?
Current State
• TIOBE Index of language popularity
• Swift #27, increasing
• Objective-C #4, declining
• Github number of active repositories
• Swift #18, growing
• Objective-C #11, flat
Data as of February 2015
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
http://githut.info/
Swift 1.2
• Xcode 6.3 Beta
• Faster builds & executables
• Better compiler diagnostics
• Stability
• and changes to the language!
as! for failable casts
if let a = a, b = b, c = c {
Nullability Annotations
enums export to
Objective-C
Deferred initialisation
of let constants
Set
So is it ready for prime
time?
Duolingo Test Center
• New App written in Swift
• 3 month

(1 dev, design/backend inplace)
+ Value types, custom operators
+ Stronger, static type system, with
type inference
+ Generics especially for typesafe
collections
Duolingo Test Center
- Tooling: Xcode, crashes, very slow code
completion, basically no debugger, unstable/
unreliable syntax highlighting (got better)
- Swift language changes.

Known from the beginning, in retrospect only
little time spent on keeping source up to date
- Incomprehensible compiler errors
Duolingo Test Center
• Crash rate ~0.2% (crashes/downloads)

mostly in Objective-C third party library
• Swift eased process of building a solid
architecture. Eliminating classes of bugs by
design (e.g. Swift’s type system)
@brentsimmons
ObjC: “I am laughing out loud”
Swift: "LOL"
@brentsimmons
• Harder on 2nd look
• optionals, generics, and tuples, value vs reference
• functional design patterns
• strict type safety
• issue interoperation with Objective-C
• “Swift is happening.”
Random Thoughts from
Developers
• Common internal libraries, not rewriting just to
be Swift
• Sometimes interacting with Cocoa API’s harder
than thought
• Strict typing is a killer feature (finds bugs during
compile time)
So is it ready for prime
time?
Yes it is!
Our take aways
• Future of iOS will be Swift
• New code written in Swift
• Rewriting only were it makes sense (lot of code changes,
restructuring)
• Know Swift AND Objective-C
• Swift uses different patterns
• Hard to follow good patterns when interfacing with
Objective-C
Experience
Experience
• Compiler bugs: crashes instead of error
• Renew Certificate, otherwise it crashes submitted
build
• At first slower when writing code, but learning fast
• Choice between Objective-C vs Swift patterns
• Cocoapods support is still beta
• cocoapods --pre installs 1.0.36(beta)
pod 'Alamofire', :git => 'https://github.com/Alamofire/
Alamofire.git', :branch => ‘xcode-6.3'
pod 'SwiftyJSON', :git => 'https://github.com/
SwiftyJSON/SwiftyJSON.git', :branch => 'xcode6.3'
Favourite Swift Way
enum Router: URLStringConvertible {
static let baseURLString = "http://example.com"
case Root
case User(String)
case Post(Int, Int, String)
// MARK: URLStringConvertible
var URLString: String {
let path: String = {
switch self {
case .Root:
return "/"
case .User(let username):
return "/users/(username)"
case .Post(let year, let month, let title):
let slug = title.stringByReplacingOccurrencesOfString(" ", withString: "-").lowercaseString
return "/(year)/(month)/(slug)"
}
}()
return Router.baseURLString + path
}
}
Enum with associated value and computed property
Learn Swift
• Read “The Swift Programming Language” by Apple
• thatthinginswift.com
• swiftdoc.org
• learnswift.tips
• Start coding in Swift!
• github.com/raywenderlich/swift-style-guide
My experience learning
Swift
• Functional Programming is different
• Force yourself to using good practices. Make
use of strict types. Which is hard.
• Harder to define public interface (no header).
Standard access modifier is internal. Also makes
testing harder.
Single most hardest
thing in Swift?
;
@wolfgang_damm
Wolfgang Damm
CTO & Co-Founder
wolfgang@pocket-lifestyle.com
www.pocket-lifestyle.com

More Related Content

What's hot

What's hot (20)

Effective Code Review (Or How To Alienate Your Coworkers)
Effective Code Review (Or How To Alienate Your Coworkers)Effective Code Review (Or How To Alienate Your Coworkers)
Effective Code Review (Or How To Alienate Your Coworkers)
 
Try! Swift Tokyo2017
Try! Swift Tokyo2017Try! Swift Tokyo2017
Try! Swift Tokyo2017
 
Eclipse OMR: a modern toolkit for building language runtimes
Eclipse OMR: a modern toolkit for building language runtimesEclipse OMR: a modern toolkit for building language runtimes
Eclipse OMR: a modern toolkit for building language runtimes
 
10/29 Austin Ansible MeetUp - AnsibleFest Talk & Extending Ansible
10/29 Austin Ansible MeetUp - AnsibleFest Talk & Extending Ansible10/29 Austin Ansible MeetUp - AnsibleFest Talk & Extending Ansible
10/29 Austin Ansible MeetUp - AnsibleFest Talk & Extending Ansible
 
Trunk based development
Trunk based developmentTrunk based development
Trunk based development
 
Better Swift from the Foundation up #tryswiftnyc17 09-06
Better Swift from the Foundation up #tryswiftnyc17 09-06Better Swift from the Foundation up #tryswiftnyc17 09-06
Better Swift from the Foundation up #tryswiftnyc17 09-06
 
Juc boston2014.pptx
Juc boston2014.pptxJuc boston2014.pptx
Juc boston2014.pptx
 
Python Experience in KKBOX Group
Python Experience in KKBOX GroupPython Experience in KKBOX Group
Python Experience in KKBOX Group
 
Achieving Continuous Delivery with Puppet
Achieving Continuous Delivery with PuppetAchieving Continuous Delivery with Puppet
Achieving Continuous Delivery with Puppet
 
Ansible, Idempotency, and Jenkins
Ansible, Idempotency, and JenkinsAnsible, Idempotency, and Jenkins
Ansible, Idempotency, and Jenkins
 
Swift GUI Development without Xcode
Swift GUI Development without XcodeSwift GUI Development without Xcode
Swift GUI Development without Xcode
 
Moving 1,000 Users & 100 Branches into Streams
Moving 1,000 Users & 100 Branches into StreamsMoving 1,000 Users & 100 Branches into Streams
Moving 1,000 Users & 100 Branches into Streams
 
GitLab for CI/CD process
GitLab for CI/CD processGitLab for CI/CD process
GitLab for CI/CD process
 
Collaborative Package Development in R
Collaborative Package Development in RCollaborative Package Development in R
Collaborative Package Development in R
 
Software development terminology
Software development terminologySoftware development terminology
Software development terminology
 
Not your fathers language c++
Not your fathers language c++Not your fathers language c++
Not your fathers language c++
 
Why Python In Entertainment Industry?
Why Python In Entertainment Industry?Why Python In Entertainment Industry?
Why Python In Entertainment Industry?
 
GitLab - Java User Group
GitLab - Java User GroupGitLab - Java User Group
GitLab - Java User Group
 
Professional iOS development
Professional iOS developmentProfessional iOS development
Professional iOS development
 
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - SydneySimplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
 

Viewers also liked (8)

Greedi.SeedPitch
Greedi.SeedPitchGreedi.SeedPitch
Greedi.SeedPitch
 
Unit#1 maqasid e sharia
Unit#1 maqasid e shariaUnit#1 maqasid e sharia
Unit#1 maqasid e sharia
 
Question 5) How have you attracted your target audience to the magazine?
Question 5) How have you attracted your target audience to the magazine?Question 5) How have you attracted your target audience to the magazine?
Question 5) How have you attracted your target audience to the magazine?
 
Đối tượng nào dễ bị bệnh mỡ máu cao
Đối tượng nào dễ bị bệnh mỡ máu caoĐối tượng nào dễ bị bệnh mỡ máu cao
Đối tượng nào dễ bị bệnh mỡ máu cao
 
Ecocentra Brochure_2015
Ecocentra Brochure_2015Ecocentra Brochure_2015
Ecocentra Brochure_2015
 
Internet and computer
Internet and computerInternet and computer
Internet and computer
 
CV OF OMKAR HALDANKAR
CV OF OMKAR HALDANKARCV OF OMKAR HALDANKAR
CV OF OMKAR HALDANKAR
 
Conventions of Documentaries
Conventions of DocumentariesConventions of Documentaries
Conventions of Documentaries
 

Similar to Swift should I switch?

Xcode, Basics and Beyond
Xcode, Basics and BeyondXcode, Basics and Beyond
Xcode, Basics and Beyond
rsebbe
 
Emulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API ProvidersEmulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API Providers
Cisco DevNet
 

Similar to Swift should I switch? (20)

Be armed to the teeth to maintain a high quality iOS code
Be armed to the teeth to maintain a high quality iOS codeBe armed to the teeth to maintain a high quality iOS code
Be armed to the teeth to maintain a high quality iOS code
 
Swift programming language
Swift programming languageSwift programming language
Swift programming language
 
Facilitating Idiomatic Swift with Objective-C
Facilitating Idiomatic Swift with Objective-CFacilitating Idiomatic Swift with Objective-C
Facilitating Idiomatic Swift with Objective-C
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java Applications
 
iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application Security
 
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
 
Ci of js and apex using jasmine, phantom js and drone io df14
Ci of js and apex using jasmine, phantom js and drone io   df14Ci of js and apex using jasmine, phantom js and drone io   df14
Ci of js and apex using jasmine, phantom js and drone io df14
 
Xcode, Basics and Beyond
Xcode, Basics and BeyondXcode, Basics and Beyond
Xcode, Basics and Beyond
 
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift ApplicationsHack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applications
 
Tips for migration from swift 2.2 to swift 3.0
Tips for migration from swift 2.2 to swift 3.0Tips for migration from swift 2.2 to swift 3.0
Tips for migration from swift 2.2 to swift 3.0
 
CocoaConf DC - Automate with Swift - Tony Ingraldi
CocoaConf DC -  Automate with Swift - Tony IngraldiCocoaConf DC -  Automate with Swift - Tony Ingraldi
CocoaConf DC - Automate with Swift - Tony Ingraldi
 
C#: Past, Present and Future
C#: Past, Present and FutureC#: Past, Present and Future
C#: Past, Present and Future
 
Cross platform development
Cross platform developmentCross platform development
Cross platform development
 
DEVNET-2006 Coding 210: Parsing JSON in C++
DEVNET-2006	Coding 210: Parsing JSON in C++DEVNET-2006	Coding 210: Parsing JSON in C++
DEVNET-2006 Coding 210: Parsing JSON in C++
 
Monkey space 2013
Monkey space 2013Monkey space 2013
Monkey space 2013
 
Future of Kotlin - How agile can language development be?
Future of Kotlin - How agile can language development be?Future of Kotlin - How agile can language development be?
Future of Kotlin - How agile can language development be?
 
Emulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API ProvidersEmulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API Providers
 
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
 
Developing a mobile cross-platform library
Developing a mobile cross-platform libraryDeveloping a mobile cross-platform library
Developing a mobile cross-platform library
 
Philly CocoaHeads 20160414 - Building Your App SDK With Swift
Philly CocoaHeads 20160414 - Building Your App SDK With SwiftPhilly CocoaHeads 20160414 - Building Your App SDK With Swift
Philly CocoaHeads 20160414 - Building Your App SDK With Swift
 

Recently uploaded

%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 

Recently uploaded (20)

WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
 

Swift should I switch?

  • 1.
  • 2. @wolfgang_damm Wolfgang Damm CTO & Co-Founder wolfgang@pocket-lifestyle.com www.pocket-lifestyle.com
  • 3. Swift Should I use it for production?
  • 4. Current State • TIOBE Index of language popularity • Swift #27, increasing • Objective-C #4, declining • Github number of active repositories • Swift #18, growing • Objective-C #11, flat Data as of February 2015 http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html http://githut.info/
  • 5. Swift 1.2 • Xcode 6.3 Beta • Faster builds & executables • Better compiler diagnostics • Stability • and changes to the language!
  • 7. if let a = a, b = b, c = c {
  • 11. Set
  • 12. So is it ready for prime time?
  • 13. Duolingo Test Center • New App written in Swift • 3 month
 (1 dev, design/backend inplace) + Value types, custom operators + Stronger, static type system, with type inference + Generics especially for typesafe collections
  • 14. Duolingo Test Center - Tooling: Xcode, crashes, very slow code completion, basically no debugger, unstable/ unreliable syntax highlighting (got better) - Swift language changes.
 Known from the beginning, in retrospect only little time spent on keeping source up to date - Incomprehensible compiler errors
  • 15. Duolingo Test Center • Crash rate ~0.2% (crashes/downloads)
 mostly in Objective-C third party library • Swift eased process of building a solid architecture. Eliminating classes of bugs by design (e.g. Swift’s type system)
  • 16. @brentsimmons ObjC: “I am laughing out loud” Swift: "LOL"
  • 17. @brentsimmons • Harder on 2nd look • optionals, generics, and tuples, value vs reference • functional design patterns • strict type safety • issue interoperation with Objective-C • “Swift is happening.”
  • 18. Random Thoughts from Developers • Common internal libraries, not rewriting just to be Swift • Sometimes interacting with Cocoa API’s harder than thought • Strict typing is a killer feature (finds bugs during compile time)
  • 19. So is it ready for prime time?
  • 21. Our take aways • Future of iOS will be Swift • New code written in Swift • Rewriting only were it makes sense (lot of code changes, restructuring) • Know Swift AND Objective-C • Swift uses different patterns • Hard to follow good patterns when interfacing with Objective-C
  • 23. Experience • Compiler bugs: crashes instead of error • Renew Certificate, otherwise it crashes submitted build • At first slower when writing code, but learning fast • Choice between Objective-C vs Swift patterns • Cocoapods support is still beta • cocoapods --pre installs 1.0.36(beta)
  • 24. pod 'Alamofire', :git => 'https://github.com/Alamofire/ Alamofire.git', :branch => ‘xcode-6.3' pod 'SwiftyJSON', :git => 'https://github.com/ SwiftyJSON/SwiftyJSON.git', :branch => 'xcode6.3'
  • 25. Favourite Swift Way enum Router: URLStringConvertible { static let baseURLString = "http://example.com" case Root case User(String) case Post(Int, Int, String) // MARK: URLStringConvertible var URLString: String { let path: String = { switch self { case .Root: return "/" case .User(let username): return "/users/(username)" case .Post(let year, let month, let title): let slug = title.stringByReplacingOccurrencesOfString(" ", withString: "-").lowercaseString return "/(year)/(month)/(slug)" } }() return Router.baseURLString + path } } Enum with associated value and computed property
  • 26. Learn Swift • Read “The Swift Programming Language” by Apple • thatthinginswift.com • swiftdoc.org • learnswift.tips • Start coding in Swift! • github.com/raywenderlich/swift-style-guide
  • 27. My experience learning Swift • Functional Programming is different • Force yourself to using good practices. Make use of strict types. Which is hard. • Harder to define public interface (no header). Standard access modifier is internal. Also makes testing harder.
  • 29. ;
  • 30.
  • 31. @wolfgang_damm Wolfgang Damm CTO & Co-Founder wolfgang@pocket-lifestyle.com www.pocket-lifestyle.com