The document summarizes the key points from a Brooklyn Swift Developers Meetup. It discusses the presenter's early excited reactions to Swift being announced at WWDC 2014. The meetup then covered an introduction to Swift, comparing it to Objective-C by highlighting features like namespaces, type safety, closures and tuples in Swift. It demonstrated Swift in a Playground and answered audience questions. Resources for learning more about Swift were provided at the end.
17. Swift vs. Objective-C
Brooklyn Swift Developers Meetup
Namespaces
Class names scoped to module
(ie. framework)
No more class pre鍖xes
18. Swift vs. Objective-C
Brooklyn Swift Developers Meetup
Type Safety
Compiler performs type checks
to 鍖nd mismatched types
Allows for type inference
var heyStr = Hey
19. Swift vs. Objective-C
Brooklyn Swift Developers Meetup
Closures
Nameless function constructed
as another function's argument
Equivalent to Blocks
numbers.map({
(number: Int) -> Int in
let result = 3 * number
return result
})
20. Swift vs. Objective-C
Brooklyn Swift Developers Meetup
Tuples
Group multiple values to single value
Supports multiple types
let someTuple = (10, true, Hello)
// type (Int, Bool, String)
let anotherTuple = (arg1: 100,
arg2: Hi)
// anotherTuple.arg1, anotherTuple.arg2
26. Resources
Brooklyn Swift Developers Meetup
The Swift Programming Language
https://itunes.apple.com/us/book/swift-programming-language/
id881256329?mt=11
WWDC 2014 Videos
https://developer.apple.com/videos/wwdc/2014
Ray Wenderlich Tutorials
http://www.raywenderlich.com/tutorials
Swift Video Tutorials
http://swiftvideotutorials.com