WWDC — 2018 What’s New in Swift?

Hitendra Solanki
1 min readJun 5, 2018

--

5th June 2018 09:30 PM GMT 5:30+

Swift 4.2 — Major release

Only the greatest developers will survive
- Hitendra Solanki inspired by Charles Darwin

  • XCode 10 -Swift 4.2
  • Faster build process with XCode 10 and Swift 4.2
  • Big improvements in ARC call managed by system — now we have less ARC calls only at start of scope and at the end of scope.
  • Now code size reduced with 10% to 30%
  • CaseIterable Protocol to Iterate all Cases of Enums
  • Array of Elements is now automatically Equatable if element is equatable
  • Struct and Classes are automatically Equatable and Hashable if all the elements of struct or class is equatable or Hashable respectively, Same for enum with tuple values also
  • New Hash function of Hashable protocol that is helpful to generate single hash value from group of hash values
  • randomElement() and shuffle() function on collection type
  • canImport(UIKit) conditional package import
  • Refined IUO — redeveloped implicitely unwrapped optional with proper support of Mental Model
  • Improved ambiguity error checking to detect Exclusive access violation

--

--

Hitendra Solanki

Software Engineer, {Self-taught Developer by passion, Quick Learner, Mentor, blogger, TeamLead} GitHub: https://github.com/hitendradeveloper