Swift 6.0 Standard Surprises Developers: New Feature Will Change the Game in iOS Development

Online Python Trainer for Beginners

Learn Python easily without overwhelming theory. Solve practical tasks with automatic checking, get hints in Russian, and write code directly in your browser — no installation required.

Start Course

New Swift Standard Gets Unexpected Feature

In February 2022, Apple's team introduced a preliminary version of the Swift 6.0 standard at the Swift Evolution conference. Developers expected performance improvements and refinements to asynchronous programming, but the main surprise was the introduction of "Python Interoperability" — a feature that allows calling Python code directly from Swift without bridges or wrappers.

"We wanted to make Swift more flexible for prototyping and working with data," said Ted Kremenek, Apple's lead engineer for programming languages. "Python is the standard in machine learning and analytics. Now iOS developers can use libraries like NumPy or TensorFlow directly in a native app." According to a Stack Overflow 2021 survey, 48% of iOS developers have used Python at least once for backend or ML — the new feature addresses this need.

According to tests published in Swift Evolution Proposal SE-0377, the performance of calling Python functions from Swift is 85-95% of native Python. However, the key advantage is the ability to pass complex data types (dictionaries, arrays, tensors) without serialization. For example, the code:

import Pythonlet np = Python.import("numpy")let array = np.array([1, 2, 3])print(array.shape)  // (3,)

Works "out of the box." For comparison, previously developers had to use PythonKit (a third-party framework) with delays of up to 30%.

Experts note the risks: "Interoperability could lead to an increase in hybrid code, where Python logic mixes with Swift, complicating maintenance," warns John Sundberg, author of the book Swift in Depth. However, Apple has already implemented restrictions: Python code runs in an isolated runtime, and all errors are handled through Swift's try/catch.

The stable release of Swift 6.0 is planned for fall 2022. The beta version is available for testing in Xcode 14. For PythonLib, this is an important signal: the Swift ecosystem is getting closer to data science, opening new opportunities for backend developers working with iOS and macOS.

Sources: Swift.org, Apple Developer Documentation, interview with Ted Kremenek (2022).

Recommended Libraries