why i don’t want to develop ios apps in objective c
TRANSCRIPT
Why I don’t want to develop iOS apps in
Objective C
by @SergDort
Great features of Swift
• Concept of nothing (optionals)• Immutability• Generics• Functions and operators overload• Enums• Elegant closure syntax• Error handling with throws
Concept of nothing (optionals)
• In Objective C we have nil• In Swift we have Optional<T>
Immutability• Readonly properties• Const pointers
Objective C
• Let keyword• Value types• private (set) in properties
Swift
Generics
Functions and and operators overload
Enums
Elegant closure syntax
let closureName: (ParameterTypes) -> (ReturnType) = { prams in
}
returnType (^blockName)(parameterTypes) = ^returnType(parameters) {...};
In Objective C
In Swift
Cool Swift libraries
FRP Libraries• Reactive Cocoa• RxSwift
Example
Resources completive checking
• R.swift
• SwiftGen
Web frameworks for Swift
• Vapor• Kitura• Perfect• Swifton