Watched String Interpolation in Swift 5 (Part 2).

Read What’s new in Swift 5.0:

  • Result is now part of Swift bringing new features:
    • get() method either returning the successful value or throwing error
    • initializer accepting a throwing closure makes possible let r = Result { try String(contentsOfFile: f) }
    • general Error protocol could be used, rather than using Result<Int, NetworkError> could use Result<Int, Error>
  • raw strings;
  • customizable string interpolation bring absolutely crazy stuff. should experiment with it (TODO:);
  • @dynamicCallable serves for Python or JavaScript bridging but could be used for creating some creasy stuff;
  • @unknown for handling future enum cases;
  • nested optionals resulting from try? are flattened;
  • isMultiple(of:) for checks like rowNumber % 2 == 0;
  • compactMapValues() in dictionaries for transforming values while keeping keys intact;
  • count(where:) was discarded in betatesting, may be will return in later swift versions;

Other sources mention also:

By the way, CHANGELOG is available!