why i don’t want to develop ios apps in objective c

13
Why I don’t want to develop iOS apps in Objective C by @SergDort

Upload: seniordevonly

Post on 17-Jan-2017

202 views

Category:

Data & Analytics


0 download

TRANSCRIPT

Page 1: Why I don’t want to develop iOS apps in Objective C

Why I don’t want to develop iOS apps in

Objective C

by @SergDort

Page 2: Why I don’t want to develop iOS apps in Objective C

Great features of Swift

• Concept of nothing (optionals)• Immutability• Generics• Functions and operators overload• Enums• Elegant closure syntax• Error handling with throws

Page 3: Why I don’t want to develop iOS apps in Objective C

Concept of nothing (optionals)

• In Objective C we have nil• In Swift we have Optional<T>

Page 4: Why I don’t want to develop iOS apps in Objective C

Immutability• Readonly properties• Const pointers

Objective C

• Let keyword• Value types• private (set) in properties

Swift

Page 5: Why I don’t want to develop iOS apps in Objective C

Generics

Page 6: Why I don’t want to develop iOS apps in Objective C

Functions and and operators overload

Page 7: Why I don’t want to develop iOS apps in Objective C

Enums

Page 8: Why I don’t want to develop iOS apps in Objective C

Elegant closure syntax

let closureName: (ParameterTypes) -> (ReturnType) = { prams in

}

returnType (^blockName)(parameterTypes) = ^returnType(parameters) {...};

In Objective C

In Swift

Page 9: Why I don’t want to develop iOS apps in Objective C

Cool Swift libraries

Page 10: Why I don’t want to develop iOS apps in Objective C

FRP Libraries• Reactive Cocoa• RxSwift

Page 11: Why I don’t want to develop iOS apps in Objective C

Example

Page 12: Why I don’t want to develop iOS apps in Objective C

Resources completive checking

• R.swift

• SwiftGen

Page 13: Why I don’t want to develop iOS apps in Objective C

Web frameworks for Swift

• Vapor• Kitura• Perfect• Swifton