SlideShare ist ein Scribd-Unternehmen logo
1 von 47
Downloaden Sie, um offline zu lesen
Hidden Gems
in Swift
@akashivskyy
Agenda
‣ Literal Convertibles
‣ String Interpolation
‣ Pattern Matching
‣ Reflection
‣ Objective-C Bridging
Literal
Convertibles
Literal convertibles
struct RegularExpression {
let pattern: String
init(pattern: String)
}
let emailRegex = RegularExpression(
pattern: "^[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}$"
)
// would be nice
let emailRegex = "^[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}$"
1.0
String literal convertible
extension RegularExpression: StringLiteralConvertible {
typealias StringLiteralType = String
init(stringLiteral value: StringLiteralType) {
self.pattern = value
}
}
extension RegularExpression: ExtendedGraphemeClusterLiteralConvertible
extension RegularExpression: UnicodeScalarLiteralConvertible
1.0
All kinds of literals
‣ Array – Array, ArraySlice, Set
‣ Boolean – Bool, ObjCBool
‣ Dictionary – Dictionary, DictionaryLiteral
‣ Float – Float, Double
‣ Nil – Optional, Selector, Pointer
‣ Integer – Int, UInt, Float, Double
‣ String – String, Character, Selector
String
Interpolation
String interpolation
enum Byte: UInt8 {
case Zero = 0
case One = 1
}
let string = "(Byte.Zero)" // "Byte.Zero"
// would be nice
let string = "(Byte.Zero)" // "0"
1.0
Interpolation convertible
extension String /* : StringInterpolationConvertible */ {
init(stringInterpolationSegment byte: Byte) {
self = "(byte.rawValue)"
}
}
let string = "(Byte.Zero)" // "0"
1.0
Pattern

Matching
What are patterns?
‣ Enumeration cases
‣ Single equatable values
‣ Ranges and intervals
‣ Value bindings
‣ Type casts
‣ func ~= <T, U> (lhs: T, rhs: U) -> Bool
‣ Tuples of anything above
What are patterns?
‣ Enumeration cases
‣ Single equatable values
‣ Ranges and intervals
‣ Value bindings
‣ Type casts
‣ func ~= <T, U> (lhs: T, rhs: U) -> Bool
‣ Tuples of anything above
Where do we use them?
‣ Switch statements
‣ If-let bindings
‣ For-in loops
‣ Catch statements
case
let point = (1, 2)
switch point {
case (0, 0):
println("origin")
default:
println("arbitrary point")
}
1.0
case let where
let point = (3, 4)
switch point {
case let (x, y) where x == y:
println("point on x = y line")
default:
println("arbitrary point")
}
1.0
if let where
let point: (Int, Int)? = maybePoint()
if let (_, y) = point where y > 0 {
println("point above x axis")
}
1.2
for in where
let points = [
(1, 2),
(-3, 4),
(5, -6),
(-7, -8),
(9, 10)
]
for (x, y) in points where x > 0 && y > 0 {
println("point in 1st quadrant: ((x), (y))")
}
1.2
if case
let point = (5, 6)
let (width, height) = (
Int(UIScreen.mainScreen().bounds.width),
Int(UIScreen.mainScreen().bounds.height)
)
if case (0 ... width, 0 ... height) = point {
print("point on screen")
}
2.0
if case let where
let point = (7, 8)
if case let (x, 1 ..< Int.max) = point where x < 0 {
print("point in 2nd quadrant")
}
2.0
if case let where
switch subject {
case pattern where condition:
// becomes
if case pattern = subject where condition {
// multiple cases not yet supported
if case pattern1, pattern2 = subject { // compiler error
2.0
for case let in where
let points: [(Int, Int)?] = maybePoints()
for case .Some(let (x, y)) in points where x < 0 && y < 0 {
print("point in 3rd quadrant: ((x), (y))")
}
2.0
for case let in where
for element in subject {
if case pattern = element where condition {
// becomes
for case pattern in subject where condition {
// multiple cases not yet supported
for case pattern1, pattern2 in subject { // compiler error
2.0
Reflection
Default behavior
struct Vector {
typealias Point = (x: Double, y: Double)
let start: Point
let end: Point
var length: Double {
return sqrt(pow(end.x - start.x, 2) + pow(end.y - start.y, 2))
}
}
let unitVector = Vector(start: (0, 0), end: (1, 1))
2.0
Default behavior 2.0
(.0 0, .1 0)
(.0 1, .1 1)
Reflection methods
‣ Custom description
‣ Custom children tree
‣ Custom Quick Look preview
Custom description
extension Vector: CustomStringConvertible {
var description: String {
return "((start.x) × (start.y)) → ((end.x) × (end.y))"
}
}
2.0
Custom description 2.0
"(0.0 × 0.0) → (1.0 × 1.0)"
Custom mirror
extension Vector: CustomReflectable {
func customMirror() -> Mirror {
return Mirror(self, children: [
"start": "(start.x) × (start.y)",
"end": "(end.x) × (end.y)",
"length": length
])
}
}
2.0
Custom mirror 2.0
start "0.0 × 0.0"
end "1.0 × 1.0"
length 1.414213562373095
Custom preview
extension Vector: CustomPlaygroundQuickLookable {
func customPlaygroundQuickLook() -> PlaygroundQuickLook {
var bezierPath = UIBezierPath()
// draw the path
return .BezierPath(bezierPath)
}
}
2.0
Custom preview 2.0
Reflection principles
‣ Overrides default type descriptors
‣ Provides rich visualization
‣ Read-only
Objective-C
Bridging
Available bridging methods
‣ Inherit from Objective-C classes
‣ @objc attribute
‣ Bridging headers
‣ …and that’s basically it
Or is it?
@interface NSArray<Element> : NSObject // objective-c class
@end
struct Array<Element> { // generic swift struct
}
let swiftArray: [Int]
let objcArray = swiftArray as NSArray // no problem
2.0
Or is it?
@interface NSArray : NSObject
@end
struct Array<Element>: _ObjectiveCBridgeable {
}
let swiftArray: [Int]
let objcArray = swiftArray as NSArray
2.0
Bridgeable
protocol _ObjectiveCBridgeable {
typealias _ObjectiveCType
static func _isBridgedToObjectiveC() -> Bool
static func _getObjectiveCType() -> Any.Type
func _bridgeToObjectiveC() -> _ObjectiveCType
static func _forceBridgeFromObjectiveC(...)
static func _conditionallyBridgeFromObjectiveC(...)
}
2.0
Bridgeable
@interface XYZPoint : NSObject
- (instancetype)initWithX:(double)x y:(double)y;
@property double x;
@property double y;
@end
struct Point {
let x: Double
let y: Double
}
2.0
extension Point: _ObjectiveCBridgeable {
typealias _ObjectiveCType = XYZPoint
static func _isBridgedToObjectiveC() -> Bool {
return true
}
static func _getObjectiveCType() -> Any.Type {
return _ObjectiveCType.self
}
func _bridgeToObjectiveC() -> _ObjectiveCType {
return XYZPoint(x: x, y: y)
}
static func _forceBridgeFromObjectiveC(source: _ObjectiveCType, inout result: Point?) {
result = Point(x: source.x, y: source.y)
}
static func _conditionallyBridgeFromObjectiveC(source: _ObjectiveCType, inout result: Point?) -> Bool {
_forceBridgeFromObjectiveC(source, result: &result)
return true
}
}
2.0
Bridgeable
let objcPoint = XYZPoint(x: 1, y: 2)
if let swiftPoint = objcPoint as? Point {
// that's right
}
let objcPoint = XYZPoint(x: 3, y: 4)
let swiftPoint = objcPoint as Point // yeah
let swiftPoint = Point(x: 5, y: 6)
let objcPoint = swiftPoint as XYZPoint // hell yeah
let point: XYZPoint = Point(x: 7, y: 8) // mind: blown
2.0
Recap
‣ Literal Convertibles
‣ String Interpolation
‣ Pattern Matching
‣ Reflection
‣ Objective-C Bridging
How to learn the gems
‣ Carefully read Xcode release notes
‣ Follow right people on Twitter
‣ Study Swift module interface
‣ Use LLDB type lookup
‣ Experiment in playgrounds
Questions?
@akashivskyy
github.com/akashivskyy/talks
Thanks! 🍻
@akashivskyy
github.com/akashivskyy/talks

Weitere ähnliche Inhalte

Was ist angesagt?

Developer Experience i TypeScript. Najbardziej ikoniczne duo
Developer Experience i TypeScript. Najbardziej ikoniczne duoDeveloper Experience i TypeScript. Najbardziej ikoniczne duo
Developer Experience i TypeScript. Najbardziej ikoniczne duoThe Software House
 
Model-Driven Software Development - Static Analysis & Error Checking
Model-Driven Software Development - Static Analysis & Error CheckingModel-Driven Software Development - Static Analysis & Error Checking
Model-Driven Software Development - Static Analysis & Error CheckingEelco Visser
 
Variables, expressions, standard types
 Variables, expressions, standard types  Variables, expressions, standard types
Variables, expressions, standard types Rubizza
 
RESTful API using scalaz (3)
RESTful API using scalaz (3)RESTful API using scalaz (3)
RESTful API using scalaz (3)Yeshwanth Kumar
 
Oops lab manual2
Oops lab manual2Oops lab manual2
Oops lab manual2Mouna Guru
 
Swift で JavaScript 始めませんか? #iOSDC
Swift で JavaScript 始めませんか? #iOSDCSwift で JavaScript 始めませんか? #iOSDC
Swift で JavaScript 始めませんか? #iOSDCTomohiro Kumagai
 
Chapter 7 functions (c)
Chapter 7 functions (c)Chapter 7 functions (c)
Chapter 7 functions (c)hhliu
 
DIWE - Working with MySQL Databases
DIWE - Working with MySQL DatabasesDIWE - Working with MySQL Databases
DIWE - Working with MySQL DatabasesRasan Samarasinghe
 
Collection v3
Collection v3Collection v3
Collection v3Sunil OS
 
7 Habits For a More Functional Swift
7 Habits For a More Functional Swift7 Habits For a More Functional Swift
7 Habits For a More Functional SwiftJason Larsen
 
Standford 2015 week9
Standford 2015 week9Standford 2015 week9
Standford 2015 week9彼得潘 Pan
 
Type Driven Development with TypeScript
Type Driven Development with TypeScriptType Driven Development with TypeScript
Type Driven Development with TypeScriptGarth Gilmour
 
Let the type system be your friend
Let the type system be your friendLet the type system be your friend
Let the type system be your friendThe Software House
 
Standford 2015 week3: Objective-C Compatibility, Property List, Views
Standford 2015 week3: Objective-C Compatibility, Property List, ViewsStandford 2015 week3: Objective-C Compatibility, Property List, Views
Standford 2015 week3: Objective-C Compatibility, Property List, Views彼得潘 Pan
 
Dynamic C++ ACCU 2013
Dynamic C++ ACCU 2013Dynamic C++ ACCU 2013
Dynamic C++ ACCU 2013aleks-f
 
Objective-Cひとめぐり
Objective-CひとめぐりObjective-Cひとめぐり
Objective-CひとめぐりKenji Kinukawa
 

Was ist angesagt? (20)

Developer Experience i TypeScript. Najbardziej ikoniczne duo
Developer Experience i TypeScript. Najbardziej ikoniczne duoDeveloper Experience i TypeScript. Najbardziej ikoniczne duo
Developer Experience i TypeScript. Najbardziej ikoniczne duo
 
Model-Driven Software Development - Static Analysis & Error Checking
Model-Driven Software Development - Static Analysis & Error CheckingModel-Driven Software Development - Static Analysis & Error Checking
Model-Driven Software Development - Static Analysis & Error Checking
 
C++ L11-Polymorphism
C++ L11-PolymorphismC++ L11-Polymorphism
C++ L11-Polymorphism
 
Variables, expressions, standard types
 Variables, expressions, standard types  Variables, expressions, standard types
Variables, expressions, standard types
 
RESTful API using scalaz (3)
RESTful API using scalaz (3)RESTful API using scalaz (3)
RESTful API using scalaz (3)
 
Oops lab manual2
Oops lab manual2Oops lab manual2
Oops lab manual2
 
Swift で JavaScript 始めませんか? #iOSDC
Swift で JavaScript 始めませんか? #iOSDCSwift で JavaScript 始めませんか? #iOSDC
Swift で JavaScript 始めませんか? #iOSDC
 
Chapter 7 functions (c)
Chapter 7 functions (c)Chapter 7 functions (c)
Chapter 7 functions (c)
 
DIWE - Working with MySQL Databases
DIWE - Working with MySQL DatabasesDIWE - Working with MySQL Databases
DIWE - Working with MySQL Databases
 
C++ L08-Classes Part1
C++ L08-Classes Part1C++ L08-Classes Part1
C++ L08-Classes Part1
 
Collection v3
Collection v3Collection v3
Collection v3
 
7 Habits For a More Functional Swift
7 Habits For a More Functional Swift7 Habits For a More Functional Swift
7 Habits For a More Functional Swift
 
Standford 2015 week9
Standford 2015 week9Standford 2015 week9
Standford 2015 week9
 
Type Driven Development with TypeScript
Type Driven Development with TypeScriptType Driven Development with TypeScript
Type Driven Development with TypeScript
 
Let the type system be your friend
Let the type system be your friendLet the type system be your friend
Let the type system be your friend
 
Bind me if you can
Bind me if you canBind me if you can
Bind me if you can
 
Standford 2015 week3: Objective-C Compatibility, Property List, Views
Standford 2015 week3: Objective-C Compatibility, Property List, ViewsStandford 2015 week3: Objective-C Compatibility, Property List, Views
Standford 2015 week3: Objective-C Compatibility, Property List, Views
 
Dynamic C++ ACCU 2013
Dynamic C++ ACCU 2013Dynamic C++ ACCU 2013
Dynamic C++ ACCU 2013
 
Objective-Cひとめぐり
Objective-CひとめぐりObjective-Cひとめぐり
Objective-Cひとめぐり
 
Property-based testing
Property-based testingProperty-based testing
Property-based testing
 

Andere mochten auch

Strategia w Social Media w 6 krokach
Strategia w Social Media w 6 krokachStrategia w Social Media w 6 krokach
Strategia w Social Media w 6 krokachFilip Cieslak
 
KISS Augmented Reality
KISS Augmented RealityKISS Augmented Reality
KISS Augmented RealityNetguru
 
Why Would A Programmer Fall In Love With SPA?
Why Would A Programmer Fall In Love With SPA?Why Would A Programmer Fall In Love With SPA?
Why Would A Programmer Fall In Love With SPA?Netguru
 
Payments integration: Stripe & Taxamo
Payments integration: Stripe & TaxamoPayments integration: Stripe & Taxamo
Payments integration: Stripe & TaxamoNetguru
 
Blogi w firmie
Blogi w firmieBlogi w firmie
Blogi w firmieNetguru
 
Czy Project Manger Musi Być Osobą Techniczną?
Czy Project Manger Musi Być Osobą Techniczną?Czy Project Manger Musi Być Osobą Techniczną?
Czy Project Manger Musi Być Osobą Techniczną?Netguru
 
Rozwijanie firmy web developerskiej - Kuba Filipowski, Wiktor Schmidt, Netguru
Rozwijanie firmy web developerskiej - Kuba Filipowski, Wiktor Schmidt, NetguruRozwijanie firmy web developerskiej - Kuba Filipowski, Wiktor Schmidt, Netguru
Rozwijanie firmy web developerskiej - Kuba Filipowski, Wiktor Schmidt, NetguruBiznes 2.0
 

Andere mochten auch (8)

Strategia w Social Media w 6 krokach
Strategia w Social Media w 6 krokachStrategia w Social Media w 6 krokach
Strategia w Social Media w 6 krokach
 
KISS Augmented Reality
KISS Augmented RealityKISS Augmented Reality
KISS Augmented Reality
 
Why Would A Programmer Fall In Love With SPA?
Why Would A Programmer Fall In Love With SPA?Why Would A Programmer Fall In Love With SPA?
Why Would A Programmer Fall In Love With SPA?
 
Payments integration: Stripe & Taxamo
Payments integration: Stripe & TaxamoPayments integration: Stripe & Taxamo
Payments integration: Stripe & Taxamo
 
Blogi w firmie
Blogi w firmieBlogi w firmie
Blogi w firmie
 
Czy Project Manger Musi Być Osobą Techniczną?
Czy Project Manger Musi Być Osobą Techniczną?Czy Project Manger Musi Być Osobą Techniczną?
Czy Project Manger Musi Być Osobą Techniczną?
 
301 Adam Zygadlewicz
301 Adam Zygadlewicz301 Adam Zygadlewicz
301 Adam Zygadlewicz
 
Rozwijanie firmy web developerskiej - Kuba Filipowski, Wiktor Schmidt, Netguru
Rozwijanie firmy web developerskiej - Kuba Filipowski, Wiktor Schmidt, NetguruRozwijanie firmy web developerskiej - Kuba Filipowski, Wiktor Schmidt, Netguru
Rozwijanie firmy web developerskiej - Kuba Filipowski, Wiktor Schmidt, Netguru
 

Ähnlich wie Discover Hidden Gems in Swift

Scala @ TechMeetup Edinburgh
Scala @ TechMeetup EdinburghScala @ TechMeetup Edinburgh
Scala @ TechMeetup EdinburghStuart Roebuck
 
Idioms in swift 2016 05c
Idioms in swift 2016 05cIdioms in swift 2016 05c
Idioms in swift 2016 05cKaz Yoshikawa
 
From Java to Scala - advantages and possible risks
From Java to Scala - advantages and possible risksFrom Java to Scala - advantages and possible risks
From Java to Scala - advantages and possible risksSeniorDevOnly
 
The Art Of Readable Code
The Art Of Readable CodeThe Art Of Readable Code
The Art Of Readable CodeBaidu, Inc.
 
(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?Tomasz Wrobel
 
The Scala Programming Language
The Scala Programming LanguageThe Scala Programming Language
The Scala Programming Languageleague
 
The Ring programming language version 1.7 book - Part 48 of 196
The Ring programming language version 1.7 book - Part 48 of 196The Ring programming language version 1.7 book - Part 48 of 196
The Ring programming language version 1.7 book - Part 48 of 196Mahmoud Samir Fayed
 
Expert JavaScript tricks of the masters
Expert JavaScript  tricks of the mastersExpert JavaScript  tricks of the masters
Expert JavaScript tricks of the mastersAra Pehlivanian
 
Getting started with ES6
Getting started with ES6Getting started with ES6
Getting started with ES6Nitay Neeman
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfHiroshi Ono
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfHiroshi Ono
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfHiroshi Ono
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfHiroshi Ono
 

Ähnlich wie Discover Hidden Gems in Swift (20)

Scala @ TechMeetup Edinburgh
Scala @ TechMeetup EdinburghScala @ TechMeetup Edinburgh
Scala @ TechMeetup Edinburgh
 
Coding in Style
Coding in StyleCoding in Style
Coding in Style
 
Idioms in swift 2016 05c
Idioms in swift 2016 05cIdioms in swift 2016 05c
Idioms in swift 2016 05c
 
From Java to Scala - advantages and possible risks
From Java to Scala - advantages and possible risksFrom Java to Scala - advantages and possible risks
From Java to Scala - advantages and possible risks
 
ES6 Overview
ES6 OverviewES6 Overview
ES6 Overview
 
SDC - Einführung in Scala
SDC - Einführung in ScalaSDC - Einführung in Scala
SDC - Einführung in Scala
 
The Art Of Readable Code
The Art Of Readable CodeThe Art Of Readable Code
The Art Of Readable Code
 
(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?
 
The Scala Programming Language
The Scala Programming LanguageThe Scala Programming Language
The Scala Programming Language
 
Cpp tutorial
Cpp tutorialCpp tutorial
Cpp tutorial
 
The Ring programming language version 1.7 book - Part 48 of 196
The Ring programming language version 1.7 book - Part 48 of 196The Ring programming language version 1.7 book - Part 48 of 196
The Ring programming language version 1.7 book - Part 48 of 196
 
CppTutorial.ppt
CppTutorial.pptCppTutorial.ppt
CppTutorial.ppt
 
Scala in Places API
Scala in Places APIScala in Places API
Scala in Places API
 
Expert JavaScript tricks of the masters
Expert JavaScript  tricks of the mastersExpert JavaScript  tricks of the masters
Expert JavaScript tricks of the masters
 
Getting started with ES6
Getting started with ES6Getting started with ES6
Getting started with ES6
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
 
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfpragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdf
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 

Mehr von Netguru

Defining DSL (Domain Specific Language) using Ruby
Defining DSL (Domain Specific Language) using RubyDefining DSL (Domain Specific Language) using Ruby
Defining DSL (Domain Specific Language) using RubyNetguru
 
How To Build Great Relationships With Your Clients
How To Build Great Relationships With Your ClientsHow To Build Great Relationships With Your Clients
How To Build Great Relationships With Your ClientsNetguru
 
Agile Retrospectives
Agile RetrospectivesAgile Retrospectives
Agile RetrospectivesNetguru
 
Ruby Rails Overview
Ruby Rails OverviewRuby Rails Overview
Ruby Rails OverviewNetguru
 
From Birds To Bugs: Testowanie Z Pasją
From Birds To Bugs: Testowanie Z PasjąFrom Birds To Bugs: Testowanie Z Pasją
From Birds To Bugs: Testowanie Z PasjąNetguru
 
Communication With Clients Throughout The Project
Communication With Clients Throughout The ProjectCommunication With Clients Throughout The Project
Communication With Clients Throughout The ProjectNetguru
 
Everyday Rails
Everyday RailsEveryday Rails
Everyday RailsNetguru
 
Estimation myths debunked
Estimation myths debunkedEstimation myths debunked
Estimation myths debunkedNetguru
 
Programming Paradigms Which One Is The Best?
Programming Paradigms Which One Is The Best?Programming Paradigms Which One Is The Best?
Programming Paradigms Which One Is The Best?Netguru
 
Z 50 do 100 w ciągu roku Jak rekrutować w IT?
Z 50 do 100 w ciągu roku Jak rekrutować w IT?Z 50 do 100 w ciągu roku Jak rekrutować w IT?
Z 50 do 100 w ciągu roku Jak rekrutować w IT?Netguru
 
Paradygmaty Programowania: Czy Istnieje Najlepszy?
Paradygmaty Programowania: Czy Istnieje Najlepszy?Paradygmaty Programowania: Czy Istnieje Najlepszy?
Paradygmaty Programowania: Czy Istnieje Najlepszy?Netguru
 
CSS architecture: How To Write Clean & Scalable Code
CSS architecture: How To Write Clean & Scalable CodeCSS architecture: How To Write Clean & Scalable Code
CSS architecture: How To Write Clean & Scalable CodeNetguru
 
Ruby On Rails Intro
Ruby On Rails IntroRuby On Rails Intro
Ruby On Rails IntroNetguru
 
Perfect Project Read Me (in a few steps)
Perfect Project Read Me (in a few steps)Perfect Project Read Me (in a few steps)
Perfect Project Read Me (in a few steps)Netguru
 
The Git Basics
The Git BasicsThe Git Basics
The Git BasicsNetguru
 
From nil to guru: intro to Ruby on Rails
From nil to guru: intro to Ruby on RailsFrom nil to guru: intro to Ruby on Rails
From nil to guru: intro to Ruby on RailsNetguru
 
Working With Teams Across The Borders
Working With Teams Across The BordersWorking With Teams Across The Borders
Working With Teams Across The BordersNetguru
 
Front-End Dev Tools
Front-End Dev ToolsFront-End Dev Tools
Front-End Dev ToolsNetguru
 
OOScss Architecture For Rails Apps
OOScss Architecture For Rails AppsOOScss Architecture For Rails Apps
OOScss Architecture For Rails AppsNetguru
 
Coffeescript presentation DublinJS
Coffeescript presentation DublinJSCoffeescript presentation DublinJS
Coffeescript presentation DublinJSNetguru
 

Mehr von Netguru (20)

Defining DSL (Domain Specific Language) using Ruby
Defining DSL (Domain Specific Language) using RubyDefining DSL (Domain Specific Language) using Ruby
Defining DSL (Domain Specific Language) using Ruby
 
How To Build Great Relationships With Your Clients
How To Build Great Relationships With Your ClientsHow To Build Great Relationships With Your Clients
How To Build Great Relationships With Your Clients
 
Agile Retrospectives
Agile RetrospectivesAgile Retrospectives
Agile Retrospectives
 
Ruby Rails Overview
Ruby Rails OverviewRuby Rails Overview
Ruby Rails Overview
 
From Birds To Bugs: Testowanie Z Pasją
From Birds To Bugs: Testowanie Z PasjąFrom Birds To Bugs: Testowanie Z Pasją
From Birds To Bugs: Testowanie Z Pasją
 
Communication With Clients Throughout The Project
Communication With Clients Throughout The ProjectCommunication With Clients Throughout The Project
Communication With Clients Throughout The Project
 
Everyday Rails
Everyday RailsEveryday Rails
Everyday Rails
 
Estimation myths debunked
Estimation myths debunkedEstimation myths debunked
Estimation myths debunked
 
Programming Paradigms Which One Is The Best?
Programming Paradigms Which One Is The Best?Programming Paradigms Which One Is The Best?
Programming Paradigms Which One Is The Best?
 
Z 50 do 100 w ciągu roku Jak rekrutować w IT?
Z 50 do 100 w ciągu roku Jak rekrutować w IT?Z 50 do 100 w ciągu roku Jak rekrutować w IT?
Z 50 do 100 w ciągu roku Jak rekrutować w IT?
 
Paradygmaty Programowania: Czy Istnieje Najlepszy?
Paradygmaty Programowania: Czy Istnieje Najlepszy?Paradygmaty Programowania: Czy Istnieje Najlepszy?
Paradygmaty Programowania: Czy Istnieje Najlepszy?
 
CSS architecture: How To Write Clean & Scalable Code
CSS architecture: How To Write Clean & Scalable CodeCSS architecture: How To Write Clean & Scalable Code
CSS architecture: How To Write Clean & Scalable Code
 
Ruby On Rails Intro
Ruby On Rails IntroRuby On Rails Intro
Ruby On Rails Intro
 
Perfect Project Read Me (in a few steps)
Perfect Project Read Me (in a few steps)Perfect Project Read Me (in a few steps)
Perfect Project Read Me (in a few steps)
 
The Git Basics
The Git BasicsThe Git Basics
The Git Basics
 
From nil to guru: intro to Ruby on Rails
From nil to guru: intro to Ruby on RailsFrom nil to guru: intro to Ruby on Rails
From nil to guru: intro to Ruby on Rails
 
Working With Teams Across The Borders
Working With Teams Across The BordersWorking With Teams Across The Borders
Working With Teams Across The Borders
 
Front-End Dev Tools
Front-End Dev ToolsFront-End Dev Tools
Front-End Dev Tools
 
OOScss Architecture For Rails Apps
OOScss Architecture For Rails AppsOOScss Architecture For Rails Apps
OOScss Architecture For Rails Apps
 
Coffeescript presentation DublinJS
Coffeescript presentation DublinJSCoffeescript presentation DublinJS
Coffeescript presentation DublinJS
 

Kürzlich hochgeladen

Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 

Kürzlich hochgeladen (20)

Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 

Discover Hidden Gems in Swift

  • 3. Agenda ‣ Literal Convertibles ‣ String Interpolation ‣ Pattern Matching ‣ Reflection ‣ Objective-C Bridging
  • 5. Literal convertibles struct RegularExpression { let pattern: String init(pattern: String) } let emailRegex = RegularExpression( pattern: "^[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}$" ) // would be nice let emailRegex = "^[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}$" 1.0
  • 6. String literal convertible extension RegularExpression: StringLiteralConvertible { typealias StringLiteralType = String init(stringLiteral value: StringLiteralType) { self.pattern = value } } extension RegularExpression: ExtendedGraphemeClusterLiteralConvertible extension RegularExpression: UnicodeScalarLiteralConvertible 1.0
  • 7. All kinds of literals ‣ Array – Array, ArraySlice, Set ‣ Boolean – Bool, ObjCBool ‣ Dictionary – Dictionary, DictionaryLiteral ‣ Float – Float, Double ‣ Nil – Optional, Selector, Pointer ‣ Integer – Int, UInt, Float, Double ‣ String – String, Character, Selector
  • 9. String interpolation enum Byte: UInt8 { case Zero = 0 case One = 1 } let string = "(Byte.Zero)" // "Byte.Zero" // would be nice let string = "(Byte.Zero)" // "0" 1.0
  • 10. Interpolation convertible extension String /* : StringInterpolationConvertible */ { init(stringInterpolationSegment byte: Byte) { self = "(byte.rawValue)" } } let string = "(Byte.Zero)" // "0" 1.0
  • 12. What are patterns? ‣ Enumeration cases ‣ Single equatable values ‣ Ranges and intervals ‣ Value bindings ‣ Type casts ‣ func ~= <T, U> (lhs: T, rhs: U) -> Bool ‣ Tuples of anything above
  • 13.
  • 14. What are patterns? ‣ Enumeration cases ‣ Single equatable values ‣ Ranges and intervals ‣ Value bindings ‣ Type casts ‣ func ~= <T, U> (lhs: T, rhs: U) -> Bool ‣ Tuples of anything above
  • 15. Where do we use them? ‣ Switch statements ‣ If-let bindings ‣ For-in loops ‣ Catch statements
  • 16. case let point = (1, 2) switch point { case (0, 0): println("origin") default: println("arbitrary point") } 1.0
  • 17. case let where let point = (3, 4) switch point { case let (x, y) where x == y: println("point on x = y line") default: println("arbitrary point") } 1.0
  • 18. if let where let point: (Int, Int)? = maybePoint() if let (_, y) = point where y > 0 { println("point above x axis") } 1.2
  • 19. for in where let points = [ (1, 2), (-3, 4), (5, -6), (-7, -8), (9, 10) ] for (x, y) in points where x > 0 && y > 0 { println("point in 1st quadrant: ((x), (y))") } 1.2
  • 20. if case let point = (5, 6) let (width, height) = ( Int(UIScreen.mainScreen().bounds.width), Int(UIScreen.mainScreen().bounds.height) ) if case (0 ... width, 0 ... height) = point { print("point on screen") } 2.0
  • 21. if case let where let point = (7, 8) if case let (x, 1 ..< Int.max) = point where x < 0 { print("point in 2nd quadrant") } 2.0
  • 22. if case let where switch subject { case pattern where condition: // becomes if case pattern = subject where condition { // multiple cases not yet supported if case pattern1, pattern2 = subject { // compiler error 2.0
  • 23. for case let in where let points: [(Int, Int)?] = maybePoints() for case .Some(let (x, y)) in points where x < 0 && y < 0 { print("point in 3rd quadrant: ((x), (y))") } 2.0
  • 24. for case let in where for element in subject { if case pattern = element where condition { // becomes for case pattern in subject where condition { // multiple cases not yet supported for case pattern1, pattern2 in subject { // compiler error 2.0
  • 26. Default behavior struct Vector { typealias Point = (x: Double, y: Double) let start: Point let end: Point var length: Double { return sqrt(pow(end.x - start.x, 2) + pow(end.y - start.y, 2)) } } let unitVector = Vector(start: (0, 0), end: (1, 1)) 2.0
  • 27. Default behavior 2.0 (.0 0, .1 0) (.0 1, .1 1)
  • 28. Reflection methods ‣ Custom description ‣ Custom children tree ‣ Custom Quick Look preview
  • 29. Custom description extension Vector: CustomStringConvertible { var description: String { return "((start.x) × (start.y)) → ((end.x) × (end.y))" } } 2.0
  • 30. Custom description 2.0 "(0.0 × 0.0) → (1.0 × 1.0)"
  • 31. Custom mirror extension Vector: CustomReflectable { func customMirror() -> Mirror { return Mirror(self, children: [ "start": "(start.x) × (start.y)", "end": "(end.x) × (end.y)", "length": length ]) } } 2.0
  • 32. Custom mirror 2.0 start "0.0 × 0.0" end "1.0 × 1.0" length 1.414213562373095
  • 33. Custom preview extension Vector: CustomPlaygroundQuickLookable { func customPlaygroundQuickLook() -> PlaygroundQuickLook { var bezierPath = UIBezierPath() // draw the path return .BezierPath(bezierPath) } } 2.0
  • 35. Reflection principles ‣ Overrides default type descriptors ‣ Provides rich visualization ‣ Read-only
  • 37. Available bridging methods ‣ Inherit from Objective-C classes ‣ @objc attribute ‣ Bridging headers ‣ …and that’s basically it
  • 38. Or is it? @interface NSArray<Element> : NSObject // objective-c class @end struct Array<Element> { // generic swift struct } let swiftArray: [Int] let objcArray = swiftArray as NSArray // no problem 2.0
  • 39. Or is it? @interface NSArray : NSObject @end struct Array<Element>: _ObjectiveCBridgeable { } let swiftArray: [Int] let objcArray = swiftArray as NSArray 2.0
  • 40. Bridgeable protocol _ObjectiveCBridgeable { typealias _ObjectiveCType static func _isBridgedToObjectiveC() -> Bool static func _getObjectiveCType() -> Any.Type func _bridgeToObjectiveC() -> _ObjectiveCType static func _forceBridgeFromObjectiveC(...) static func _conditionallyBridgeFromObjectiveC(...) } 2.0
  • 41. Bridgeable @interface XYZPoint : NSObject - (instancetype)initWithX:(double)x y:(double)y; @property double x; @property double y; @end struct Point { let x: Double let y: Double } 2.0
  • 42. extension Point: _ObjectiveCBridgeable { typealias _ObjectiveCType = XYZPoint static func _isBridgedToObjectiveC() -> Bool { return true } static func _getObjectiveCType() -> Any.Type { return _ObjectiveCType.self } func _bridgeToObjectiveC() -> _ObjectiveCType { return XYZPoint(x: x, y: y) } static func _forceBridgeFromObjectiveC(source: _ObjectiveCType, inout result: Point?) { result = Point(x: source.x, y: source.y) } static func _conditionallyBridgeFromObjectiveC(source: _ObjectiveCType, inout result: Point?) -> Bool { _forceBridgeFromObjectiveC(source, result: &result) return true } } 2.0
  • 43. Bridgeable let objcPoint = XYZPoint(x: 1, y: 2) if let swiftPoint = objcPoint as? Point { // that's right } let objcPoint = XYZPoint(x: 3, y: 4) let swiftPoint = objcPoint as Point // yeah let swiftPoint = Point(x: 5, y: 6) let objcPoint = swiftPoint as XYZPoint // hell yeah let point: XYZPoint = Point(x: 7, y: 8) // mind: blown 2.0
  • 44. Recap ‣ Literal Convertibles ‣ String Interpolation ‣ Pattern Matching ‣ Reflection ‣ Objective-C Bridging
  • 45. How to learn the gems ‣ Carefully read Xcode release notes ‣ Follow right people on Twitter ‣ Study Swift module interface ‣ Use LLDB type lookup ‣ Experiment in playgrounds