Upgrade to Pro — share decks privately, control downloads, hide ads and more …

展望 Swift 4

Johnlin
August 16, 2016

展望 Swift 4

Johnlin

August 16, 2016
Tweet

More Decks by Johnlin

Other Decks in Programming

Transcript

  1. ։ᚙܭᙘ • 2016 : Swift 3.0 • 2017 य़ఱ: Swift

    3.x • 2017 ळఱ: Swift 4 • ଖத။ἥᎎ bugfix release ૾ੋ 3.0.1
  2. Conditional Conformance extension Array : Equatable where Element : Equatable

    { } func ==<T : Equatable>(lhs: Array<T>, rhs: Array<T>) -> Bool { ... }
  3. Fragile Base Class class Foo{ func p(str:String){ print(str) } }

    class Bar : Foo{ func log(str:String){ p(str: str) } }
  4. Fragile Base Class class Foo{ func p(str:String){ //print(str) //ෆཁ౸႔စ print

    } } class Bar : Foo{ func log(str:String){ p(str: str) } }
  5. Fragile Base Class class Foo{ func p(str:String){ //print(str) //ෆཁ౸႔စ print

    } } class Bar : Foo{ func log(str:String){ p(str: str) // } }
  6. ආ໔ Fragile Base Class • ࢖༻ private, internal, public, open,

    final ౳ ᮫伴ࣈ • ୞༗ଧࢉඃਓ៺ঝతClass ࠽֘ඃ៺ঝɻ
  7. Memory Ownership model • อཹARC, ⃧ՃҰݸֹ֎૾Rustత ownership modelɻ • ᩋ

    Swift ༗ߋೳⴺ༬ଌతᏈೳɻ • ။େ෯मվABI, Type Systemɻ
  8. First Class Concurrency • Actor, async/await, atomic ೭ྨత • 㑌ݸਓ౎૝ཁ

    • ೭ޙ။޷޷త౼࿦ɼෆաSwift 4 ग़ိલጯ֘၏ෆ ׬ɻ
  9. ଖଞҰେଯ • Submodules • implicit promotions 
 between numeric types

    • importing C++ APIs • hygenic macro system • guaranteed tail calls • making enums enumerable • typed ‘throws’ • user defined attributes • abstract methods/classes • better SIMD support • ‘dynamic’ for non- at objc • data parallelism support • higher kinded types • ଒ൟෆٴඋࡌ
  10. ݁࿦ • Swift 4 ။ઌᜦఆ Source & ABI • ။༗৽త

    Memory Model • Swift 3 ጯ֘ࠓ೥ळఱ။ग़
  11. Q&A