際際滷

際際滷Share a Scribd company logo
Brooklyn Swift Developers Meetup
June 17, 2014
Swift: The Basics
WWDC 2014
Brooklyn Swift Developers Meetup
And One More Thing
Brooklyn Swift Developers Meetup
Early Reactions
Brooklyn Swift Developers Meetup
Early Reactions
Brooklyn Swift Developers Meetup
Early Reactions
Brooklyn Swift Developers Meetup
Early Reactions
Brooklyn Swift Developers Meetup
HOLY FUCK
- me
Early Reactions
Brooklyn Swift Developers Meetup
FUCK YEAH
- me 5 min later
Early Reactions
Brooklyn Swift Developers Meetup
Early Reactions
Brooklyn Swift Developers Meetup
Early Reactions
Brooklyn Swift Developers Meetup
Early Reactions
Brooklyn Swift Developers Meetup
Early Reactions
Brooklyn Swift Developers Meetup
Swift
Brooklyn Swift Developers Meetup
Swift
Brooklyn Swift Developers Meetup
Convenience of a Modern
Scripting language with the
Performance of Objective-C
Swift vs. Objective-C
Brooklyn Swift Developers Meetup
Swift vs. Objective-C
Brooklyn Swift Developers Meetup
Namespaces

 Class names scoped to module
(ie. framework)

 No more class pre鍖xes
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
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	
})
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
Playground
Brooklyn Swift Developers Meetup
Playground
Brooklyn Swift Developers Meetup
 Interactive coding environment for testing

 Immediate feedback
Brooklyn Swift Developers Meetup
DEMO
Brooklyn Swift Developers Meetup
Questions?
Brooklyn Swift Developers Meetup
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
Github: https://github.com/marcdown

Twitter: @creativemessdev

!
Source: https://github.com/marcdown/SwiftPlayground
Brooklyn Swift Developers Meetup
Thanks!

More Related Content

Swift: The Basics