Swift 6 Adds Concurrent Code Mode
Written by Alex Denham   
Thursday, 13 June 2024

Apple has released details of what developers can expect in Swift 6, due to be released this year. The team says Swift 6 makes it easier to write concurrent code correctly with a new, optional language mode that analyzes your code at compile-time and diagnoses possible data races. 

This release also brings other enhancements to concurrency and generics, as well as improvements to Language Server Protocol support.

Swift is Apple's language that was originally developed as an alternative language to Objective C. The aim of Swift's designers is to provide a single language including the best ideas from languages such as C# and JavaScript, while being easy to use. It was made open source by Apple in 2015, and a Linux build was added at that point. Swift 6 will be the first major new release of the language for five years.


The details of Swift 6, which were announced at Apple's WWDC Developer conference, start with a new mode aimed at making it easier to write code for multicore architectures. Swift 6 will introduce compile-time data-race safety, which diagnoses concurrent access to memory across a developer's project at compile time, so allowing errors to be caught and fixed.

Some of the changes are aimed at improving concurrency checking and getting rid of the "many false-positive data-race warnings" that Apple says were present in version 5.10.

One addition designed to make concurrency easier to achieve is the ability to create isolation regions that let the compiler show whether or not a section of code can run concurrently.

In addition to the language improvements, Apple announced it is adding support for additional code editors that make use of the Language Server Protocol.

Apple also announced plans to migrate Swift to a dedicated GitHub organization. Swiftlang will host a number of critical elements of Swift, including the Swift compiler, Foundation, and other key libraries.

Swift 6 is due before the end of 2024.



More Information

Swift Org

Swiftlang On GitHub

Related Articles

Swift 5.2 Improves Performance

Swift Adds More Generics Support

Swift 4 Improves String Handling

Swift 3.0 Released!

Swift 2 To Be Open Source  

Apple's New Language - Swift            


To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.


Look Once to Hear - A Spy's Dream Come True

Deep learning has triumphed again. You can don a pair of headphones, look at a person talking and from then on the system will track the person so you can hear them as they move away or become swamped [ ... ]

Researchers Use AI To Decode Dog Language

Scientists from the University of Michigan have used AI to decode what dogs mean by different types of bark. Wav2Vec2 succeeded at four classification tasks - dog recognition, breed identification, ge [ ... ]

More News

kotlin book



or email your comment to: comments@i-programmer.info

Last Updated ( Thursday, 13 June 2024 )