Exploring Swift’s numeric types and protocols

Exploring Swift’s numeric types and protocols

Swift is a memory-safe language and you constantly see this manifest in your code with the error 'Binary operator cannot be applied to operands of type…' when you attempt to mix numeric types in expressions. In this talk we’ll explore the design and implementation of Swift’s numeric protocols and types, which have evolved significantly in Swift 3 and 4. We’ll dive into how floating-point numbers work, investigate some of the more obscure APIs, and learn how we can make our raw calculation code more expressive.

Video:
https://www.youtube.com/watch?v=cdRn4DJq9eY

Swift playground:
https://github.com/jessesquires/talks/tree/master/2017/10-19%20Exploring%20Swift's%20numeric%20protocols/NumericSwift.playground

Event:
http://iosconf.sg

Ba6b43b7b6198e2c20cbd348431ca6f4?s=128

Jesse Squires

October 20, 2017
Tweet