• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Home
  • About Us
  • Contact Us

iHash

News and How to's

  • 10.1" WiFi Digital Photo Frame with Photo/Video Sharing for $149

    10.1" WiFi Digital Photo Frame with Photo/Video Sharing for $149
  • 8" WiFi Cloud Photo Frame for $112

    8" WiFi Cloud Photo Frame for $112
  • 8" WiFi Digital Photo Frame with Auto Rotation & Photo/Video Sharing for $112

    8" WiFi Digital Photo Frame with Auto Rotation & Photo/Video Sharing for $112
  • Wireless Wall Tap Smart Plug for $39

    Wireless Wall Tap Smart Plug for $39
  • Wi-Fi 1080p Indoor 360° View PTZ IP Camera for $57

    Wi-Fi 1080p Indoor 360° View PTZ IP Camera for $57
  • News
    • Rumor
    • Design
    • Concept
    • WWDC
    • Security
    • BigData
  • Apps
    • Free Apps
    • OS X
    • iOS
    • iTunes
      • Music
      • Movie
      • Books
  • How to
    • OS X
      • OS X Mavericks
      • OS X Yosemite
      • Where Download OS X 10.9 Mavericks
    • iOS
      • iOS 7
      • iOS 8
      • iPhone Firmware
      • iPad Firmware
      • iPod touch
      • AppleTV Firmware
      • Where Download iOS 7 Beta
      • Jailbreak News
      • iOS 8 Beta/GM Download Links (mega links) and How to Upgrade
      • iPhone Recovery Mode
      • iPhone DFU Mode
      • How to Upgrade iOS 6 to iOS 7
      • How To Downgrade From iOS 7 Beta to iOS 6
    • Other
      • Disable Apple Remote Control
      • Pair Apple Remote Control
      • Unpair Apple Remote Control
  • Special Offers
  • Contact us

Swift 5.3 released!

Mar 19, 2022 by iHash Leave a Comment

Swift 5.3 is now officially released! 🎉

Swift 5.3 continues to focus on language refinements, the developer experience, and expanding the Swift ecosystem to enable more opportunities to write Swift. These sketch notes, created by Amy Tsai, illustrate the highlights of the Swift 5.3 release:

Full resolution version available on Amy’s tweet

You can also experiment with many of these updates in a playground put together by Paul Hudson.

Table of Contents

  • Language and Standard Library
    • New Features and Refinements
    • Runtime Performance Improvements
  • Developer Experience
    • Indentation Improvements while Editing Code
    • Code Completion
    • Build Time Improvements
    • Compiler Diagnostics
    • Debugging
  • Ecosystem
    • Swift Package Manager
      • Resources (SE-0271)
      • Localization (SE-0278)
      • Binary Dependencies (SE-0272)
      • Conditional Target Dependencies (SE-0273)
  • Downloads
  • Sources

Language and Standard Library

New Features and Refinements

Swift 5.3 brings many language refinements that improve the ergonomics of writing Swift code. These updates can help you be a more productive Swift programmer by reducing boilerplate and redundant code, and enabling more functionality to be defined in libraries that you may use.

Swift 5.3 implements the following proposals from the Swift Evolution process:

  • SE-0263 – Add a String Initializer with Access to Uninitialized Storage

  • SE-0266 – Synthesized Comparable conformance for enum types

  • SE-0267 – where clauses on contextually generic declarations

  • SE-0268 – Refine didSet Semantics

  • SE-0269 – Increase availability of implicit self in @escaping closures when reference cycles are unlikely to occur

  • SE-0276 – Multi-Pattern Catch Clauses

  • SE-0277 – Float16

  • SE-0279 – Multiple Trailing Closures

  • SE-0280 – Enum cases as protocol witnesses

  • SE-0281 – @main: Type-Based Program Entry Points

  • SE-0282 – Clarify the Swift memory consistency model ⚛︎

  • SE-0285 – Ease the transition to concise magic file strings

  • SE-0286 – Forward-scan matching for trailing closures

Many of these features were proposed and implemented by active community members: Kelvin Ma, Anthony Latsis, Suyash Srijan, Frederick Kellison-Linn and Owen Voorhees. Thank you for your contributions!

Swift 5.3 also includes fixes for several commonly-reported compiler limitations:

  • SR-75 – Unapplied references to protocol requirements are now supported

  • SR-7083 – lazy properties can define didSet and willSet accessors

  • SR-8814 – Generic classes can use default implementations of protocol requirements when conforming to protocols with associated types

Runtime Performance Improvements

Swift 5.3 significantly improves both binary code size and runtime memory usage. Measurements of these improvements have yielded exciting results across various projects:

  • Starting with Swift 4, the Swift team at Apple has been measuring the binary code size of a Swift rewrite of a UIKit application (written in Objective-C) that ships with iOS. In Swift 4, the code size was about 2.3x the size of the Objective-C version. In Swift 5.3, the code size is under 1.5x the size of the Objective-C version.

  • In MovieSwiftUI, an excellent open-source SwiftUI app by Thomas Ricouard, the application logic code size is reduced by over 40% compared to Swift 5.1.

  • In a test app that creates an array of 400 model objects, the heap memory due to runtime overhead has been reduced to use less than 1/3 of the heap memory used in Swift 5.1.

These measurements were reported in the ‘What’s New in Swift’ talk at WWDC 2020.

Binary size improvements will vary by patterns of use. The biggest improvement is in projects that declare a large number of types, through reduction in the size of
“value functions” – the invisible functions that the compiler generates to create, copy, and destroy value types. This is especially beneficial to SwiftUI apps.

Additionally, Swift applications now have lower heap memory overhead at runtime. The Swift runtime caches less information on startup to track things like protocol conformances, due to improvements in the runtime that made this caching less necessary. An application written in Swift should now use less heap memory than an otherwise-identical program written in Objective-C.

Developer Experience

Indentation Improvements while Editing Code

The automatic indentation implementation in SourceKit was overhauled in this release, fixing ~50 feedback reports in the process. In particular, the automatic indentation of the following cases are much improved in this release:

  • Chained method calls involving closures

  • Call arguments, parameters, and collection elements that span multiple lines, and

  • Multi-line if, guard and while conditions

Code Completion

Swift 5.3 further improves code completion performance and quality:

  • Repeated code completion invocations inside function bodies are now up to 15 times faster compared to Swift 5.2. This was achieved by reusing some of the computation done for previous completions in the same file. These speedups will be visible in both Xcode and users of SourceKit-LSP.

  • Callable values of user-defined nominal types (SE-0253) are now supported in Swift code completion. Code completion shows the calling signature after a base expression followed by an opening parenthesis

Build Time Improvements

Swift 5.3 incorporates a new strategy for how the compiler handles declarations in your Swift code. These changes bring several concrete improvements:

  • Faster incremental build times by avoiding duplicated compiler work across source files, and more accurately identifying code that has not changed from the previous build

  • Better correctness, by fixing multiple cases where the behavior of the compiler was sensitive to declaration order or nesting

  • Faster compilation of code that uses types with a large number of properties and functions that are imported from another library.

These improvements were achieved by expanding the adoption of a new centralized framework in the compiler that records fine-grained dependency information, caches the results of expensive computation that may need to be repeated, and automatically detects dependency cycles within your Swift code.

Compiler Diagnostics

Swift 5.3 builds upon the diagnostics improvements in Swift 5.2 to further enhance the quality and precision of error messages, especially in SwiftUI code. More specifically, the transition to the New Diagnostics Architecture is now complete in Swift 5.3!

Many of the diagnostics improvements in 5.3 involve complex generic code where a generic argument has a failed requirement, such as a missing conformance. For example, consider the following code:

struct FormList<FieldID> {
  init<Data: Collection>(_ data: Data) where Data.Element: Identifiable, 
                                             FieldID == Data.Element.ID { ... }
}

struct Field {
  let id: String
}

func createForm(fields: [Field]) {
  let form = FormList(fields)
}

In Swift 5.2, this compiler reported a very cryptic error message:

error: expression type 'FormList<_>' is ambiguous without more context
  let form = FormList(fields)
             ^~~~~~~~~~~~~~~~

In Swift 5.3, the compiler correctly reports the missing conformance, along with a helpful note showing the source of the requirement:

error: initializer 'init(_:)' requires that 'Field' conform to 'Identifiable'
  let form = FormList(fields)
             ^
             
note: where 'Data.Element' = 'Field'
  init<Data: Collection>(_ data: Data) where Data.Element: Identifiable,
  ^

Debugging

Swift 5.3 supports better error messages for runtime failures. When debug info is available, the debugger will now display the reason for traps in the standard library instead of just showing an opaque invalid instruction crash.

LLDB is now more robust when debugging binaries that were compiled on a different machine:

  • SDK paths from the build machine are automatically recognized and remapped to local paths.

  • Source and include paths can optionally be remapped with .dSYM path remapping dictionaries.

Ecosystem

Swift Package Manager

Resources (SE-0271)

Packages can now contain resources such as images and other data files needed at runtime. Resources are scoped by target, and are processed and embedded into client apps when the package is built. Resources can be accessed from source code using Foundation’s Bundle API.

Resources that are specific to Apple platforms (such as asset catalogs, storyboards, and CoreData models) can only be built in Xcode, but generic resources are supported on all platforms. New API in the package manifest provides control over which source files to treat as resources.

Localization (SE-0278)

Packages can now contain localizable content such as .strings files and localized variants of resources. Localizable content can be added to a package using .lproj directories, and can be accessed using Foundation APIs.

Binary Dependencies (SE-0272)

Packages can now vend prebuilt libraries distributed as XCFrameworks, allowing dependencies on libraries that can’t be distributed as source code. This feature is currently only available when building for Apple platforms. New API in the package manifest lets XCFrameworks be referenced as binary targets.

Conditional Target Dependencies (SE-0273)

A package target’s dependencies can now be declared as conditional, which can be used to limit dependencies by platform. This provides more flexibility to describe complex target dependencies that support multiple platforms.

Note that conditions based on build configuration were also a part of the Swift evolution proposal, but are yet to be implemented, and are therefore not part of Swift 5.3.

Downloads

Official binaries are available for download from Swift.org as toolchains to work with Xcode, as well as Linux toolchains and Docker images. Swift 5.3 is also included in Xcode 12. An official toolchain for Windows will be available in the coming weeks.

Sources

Development on Swift 5.3 was tracked in the release/5.3 branch on the following repositories:

  • indexstore-db
  • sourcekit-lsp
  • swift-tools-support-core
  • swift-llbuild
  • swift-package-manager
  • swift
  • swift-cmark
  • swift-corelibs-foundation
  • swift-corelibs-libdispatch
  • swift-corelibs-xctest
  • swift-integration-tests
  • swift-stress-tester
  • swift-syntax
  • swift-xcode-playground-support
  • llvm-project

The tag swift-5.3-RELEASE designates the specific revisions in those repositories that make up the final version of Swift 5.3.

The release/5.3 branch will remain open, but under the same release management process, to accumulate changes for the next release.



Swift 5.3 released!

Share this:

  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

Filed Under: News Tagged With: Apple

Special Offers

  • 10.1" WiFi Digital Photo Frame with Photo/Video Sharing for $149

    10.1" WiFi Digital Photo Frame with Photo/Video Sharing for $149
  • 8" WiFi Cloud Photo Frame for $112

    8" WiFi Cloud Photo Frame for $112
  • 8" WiFi Digital Photo Frame with Auto Rotation & Photo/Video Sharing for $112

    8" WiFi Digital Photo Frame with Auto Rotation & Photo/Video Sharing for $112
  • Wireless Wall Tap Smart Plug for $39

    Wireless Wall Tap Smart Plug for $39
  • Wi-Fi 1080p Indoor 360° View PTZ IP Camera for $57

    Wi-Fi 1080p Indoor 360° View PTZ IP Camera for $57

Reader Interactions

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

E-mail Newsletter

  • Facebook
  • GitHub
  • Instagram
  • Pinterest
  • Twitter
  • YouTube

More to See

New ‘Quantum’ Builder Lets Attackers Easily Create Malicious Windows Shortcuts

Jun 25, 2022 By iHash

10.1" WiFi Digital Photo Frame with Photo/Video Sharing for $149

Jun 26, 2022 By iHash

Tags

* Apple Cisco computer security cyber attacks cyber crime cyber news Cyber Security cybersecurity cyber security news cyber security news today cyber security updates cyber threats cyber updates data breach data breaches google hacker hacker news Hackers hacking hacking news how to hack incident response information security iOS iOS 7 iOS 8 iPhone iPhone 6 Malware microsoft network security Privacy ransomware malware risk management security security breaches security vulnerabilities software vulnerability the hacker news Threat update video web applications

Latest

Charlie Klein

Key-Thoughts on Cross-Organizational Observability Strategy

Logz.io ran two surveys earlier this year to better understand current trends, challenges, and strategies for implementing more effective and efficient observability – including the DevOps Pulse Survey and a survey we ran with Forrester Research. Together, we received responses from 1300+ DevOps and IT Ops practitioners on observability challenges, opportunities, and ownership strategies. Additionally, […]

8" WiFi Cloud Photo Frame for $112

Expires June 25, 2122 23:59 PST Buy now and get 13% off KEY FEATURES With the 8″ WiFi Cloud Photo Frame you can send photos from your phone to your frame, control which photos are to be sent to your frame, and update your images instantly. You can send photos from any device with an […]

8" WiFi Digital Photo Frame with Auto Rotation & Photo/Video Sharing for $112

Expires June 25, 2122 23:59 PST Buy now and get 19% off KEY FEATURES Send Pictures and Videos from your smartphone to eco4life WiFi Digital Photo Frame, from anywhere in the world using the eco4life App. The eco4life smart frame is simply the best way to enjoy your favorite photos and videos with your families […]

How is IoT Changing the Future of Cruising?

In this special guest feature, Ian Richardson, CEO & Co-Founder, theICEway, discusses how as the world continues to open for travel, cruise industry leaders are looking to leverage the next wave of travel technology to improve the passenger experience. With 20+ years of experience in both IT and the cruise industry, Ian Richardson co-founded theICEway […]

Learn NIST Inside Out With 21 Hours of Training @ 86% OFF

In cybersecurity, many of the best jobs involve working on government projects. To get a security clearance, you need to prove that you meet NIST standards. Cybersecurity firms are particularly interested in people who understand the RMF, or Risk Management Framework — a U.S. government guideline for taking care of data. The NIST Cybersecurity & […]

Smart Home DIY Wireless Alarm Security System 5-Piece Kit for $74

Expires June 25, 2122 23:59 PST Buy now and get 31% off KEY FEATURES Create a smart home with the Eco4life Wireless Alarm Security System 5 Pieces Kit. With this system, you can monitor your home and alert you of any activity through cell phones, smart devices, and home automation systems. Use the eco4life app […]

Jailbreak

Pangu Releases Updated Jailbreak of iOS 9 Pangu9 v1.2.0

Pangu has updated its jailbreak utility for iOS 9.0 to 9.0.2 with a fix for the manage storage bug and the latest version of Cydia. Change log V1.2.0 (2015-10-27) 1. Bundle latest Cydia with new Patcyh which fixed failure to open url scheme in MobileSafari 2. Fixed the bug that “preferences -> Storage&iCloud Usage -> […]

Apple Blocks Pangu Jailbreak Exploits With Release of iOS 9.1

Apple has blocked exploits used by the Pangu Jailbreak with the release of iOS 9.1. Pangu was able to jailbreak iOS 9.0 to 9.0.2; however, in Apple’s document on the security content of iOS 9.1, PanguTeam is credited with discovering two vulnerabilities that have been patched.

Pangu Releases Updated Jailbreak of iOS 9 Pangu9 v1.1.0

  Pangu has released an update to its jailbreak utility for iOS 9 that improves its reliability and success rate.   Change log V1.1.0 (2015-10-21) 1. Improve the success rate and reliability of jailbreak program for 64bit devices 2. Optimize backup process and improve jailbreak speed, and fix an issue that leads to fail to […]

Activator 1.9.6 Released With Support for iOS 9, 3D Touch

  Ryan Petrich has released Activator 1.9.6, an update to the centralized gesture, button, and shortcut manager, that brings support for iOS 9 and 3D Touch.

Copyright iHash.eu © 2022
We use cookies on this website. By using this site, you agree that we may store and access cookies on your device. Accept Read More
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT