翻译进度
1
分块数量
0
参与人数

1.2. 版本兼容性

这是一篇协同翻译的文章,你可以点击『我来翻译』按钮来参与翻译。

本文从苹果官网提供的《the swift programming language》 翻译,翻译过程中可以参考本站之前翻译的4.2 版本

请各位在翻译的时候注意检查如下几项:

  1. 遵循社区文档翻译规范;
  2. 遵循社区文档撰写指南
  3. 检查翻译原文的文档格式及代码缩进,如有问题请及时修正再进行翻译。

This book describes Swift 5.6, the default version of Swift that’s included in Xcode 13. You can use Xcode 13 to build targets that are written in either Swift 5.6, Swift 4.2, or Swift 4.

When you use Xcode 13 to build Swift 4 and Swift 4.2 code, most Swift 5.6 functionality is available. That said, the following changes are available only to code that uses Swift 5.6 or later:

  • Functions that return an opaque type require the Swift 5.1 runtime.
  • The try? expression doesn’t introduce an extra level of optionality to expressions that already return optionals.
  • Large integer literal initialization expressions are inferred to be of the correct integer type. For example, UInt64(0xffff_ffff_ffff_ffff) evaluates to the correct value rather than overflowing.

Concurrency requires Swift 5.6 or later, and a version of the Swift standard library that provides the corresponding concurrency types. On Apple platforms, set a deployment target of at least iOS 15, macOS 12, tvOS 15, or watchOS 8.0.

A target written in Swift 5.6 can depend on a target that’s written in Swift 4.2 or Swift 4, and vice versa. This means, if you have a large project that’s divided into multiple frameworks, you can migrate your code from Swift 4 to Swift 5.6 one framework at a time.

本文章首发在 LearnKu.com 网站上。

本文中的所有译文仅用于学习和交流目的,转载请务必注明文章译者、出处、和本文链接
我们的翻译工作遵照 CC 协议,如果我们的工作有侵犯到您的权益,请及时联系我们。

thebestxt
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
讨论数量: 0
发起讨论 只看当前版本


暂无话题~