preface

Apple launched its Unleashed event, and with the help of the powerful M1 Pro or M1 Max chip, whether it’s developing apps based on the new MacBook Pro or under the MacBook Pro, The new phones will give us breakthrough performance and amazing battery life.

Combined with a powerful neural engine, a Prores-enabled media engine for enhanced machine learning and upgrades, the new MacBook Pro enables our apps to do things that have never been done before.

In order to continuously release and update the Swift community weekly, we hope to invite Swift fans to participate in editing the weekly and also invite sponsors to support our platform.

Recommend the blog

Swift 5 goes from zero to master iOS development boot camp

Swift 5 iOS Development Training Camp from zero to mastery is a practical tutorial from the basics to iOS project development, which is compiled by senior iOS development programmer Hui Shao himself. At the end of the article, there is a book raffle for additional benefits to the Swift community

Principles of iOS UI automated testing and application practice on Trip.com

From Ctrip IBU public wireless Ni Yao combat share: iOS UI automated test combat and principle summary.

This article takes you through the new open source library for the Swift community

Recently Swift community action frequently, is to log in Windows, is to launch the underlying base library. Now the Swift algorithm library has been launched, now let’s see what it has in the end, whether it is worth applying in production now, facing the rich content raywenderlich/ Swift-algorithm-club is competitive enough.

Multi-angle experience Swift method distribution

We know that Swift has three distribution methods: static distribution (direct distribution), VTable distribution (function table distribution) and message distribution. Below we respectively from SIL intermediate language, and assembly perspective experience Swift method distribution.

An introduction to the task

Sr-15312 [swift-docc] Adds the version command to the DocC command line tool

Sr-15312 [swift-docc] The main tutorial navigation dropdown cannot bold the current tutorial font when the browser URL is not lowercase

News and Community

Franklin Schrans announces that Swift-DOCC will be open source.

Marin Todorov has finally revealed his work on Swift Markdown.

Federico Zanetello wrote an article explaining the use of @warn_unqualified_access.

Dave DeLong explains how to simplify backward compatibility in Swift.

Swift-docc documentation is now available on Swift.org (use swift-docc!). .

A proposal under review

The SE-0325 add-on plug-in API is under review.

Se-0303 introduces the ability to define build tool plug-ins in SwiftPM, allowing custom tools to be invoked at build packaging time. To support this feature, SE-0303 introduces a minimal initial API through which the plug-in can get information about the targets that are invoked to build.

The proposal extends the plug-in API to provide more context, including a richer package diagram representation. This is in preparation for supporting new types of plug-ins in the future.

Swift BBS

1. Nuri Amari put forward suggestions to improve the ClangImporter.

Suggest improvements to the ClangImporter and provide more detailed feedback when errors occur importing C or Objective-C entities. For now, when the ClangImporter is unable to import entities (functions, types, macros, etc.) completely or partially, there will be no error notification. Current Swift compilation errors mostly indicate that entities were never defined.

2. Frederick Kellison-Linn proposed the idea of critical path to function transformation.

This proposal describes the ability to use the key path expression \ root. Value when the (Root) -> Value function is allowed.

Swift-evolution threads: Critical path expressions as functions

3. Patrick Pijnappel proposes to implement detailed pattern matching for non-open classes.

Because you now distinguish between open and non-open classes, the non-open class hierarchy should match perfectly. For adding new subclasses, you don’t need to add any syntax.

4. Guillaume Lessard proposed improvements to pointer usability.

The proposal introduces some quality-of-life improvements for UnsafePointer, Mutable, and Raw.

  1. Add API to get oneUnsafeRawPointerInstance, which is an instance advancing from the starting point to a given alignment
  2. In a givenUnsafePointer<T>Add an API to get a pointer T to the aggregated storage property
  3. willUnsafe[Mutable]PointerUnselected subscripts are renamed to includeuncheckedThe label
  4. Adds the ability to compare any two types of Pointers

5. Pavel Yaskevich proposes to improve the syntax of the same type of constraint.

In order to achieve our goal of improving generic UI, we propose several improvements that address the syntactic gap between protocols and generic types, hiding some of the complexity (both visually and cognitively) in the constraints of the same type for associated types and generic type parameters.

6. Holly Borla starts by discussing how to simplify the learning curve for introducing generic parameters.

Swift’s generic system is very expressive, but understanding the full universality of protocols with related types, generic signatures with WHERE clauses, and other generic features has been a major obstacle to introducing generics into the Swift project. The primary goal of the generic system is to abstract concrete apis into the learning curve of generic apis by improving the ergonomics of writing generic code in Swift. The purpose of this discussion is to solicit ideas on possible directions to achieve this goal and gather other ideas that have been raised in the community. Feel free to leave your questions, comments and thoughts at the end of this article!

Many of the ideas in this post were put forward by @joe_groff in improving generic UI.

7. Nate Cook came up with the idea of a character class for string processing.

The declarative string processing overview covers matching supported by regular expressions, but does not provide details on syntax and semantics, leaving clarification for a later introduction.

The text of regular expressions provides more details about regular expression syntax, such as delimiters and the internal structure of pCL-syntax, omits discussion of regular expression semantics. The purpose of this post is to address a target subset of regular expression semantics: the definition of character classes. We recommend working directly with the existing Character and Unicode.Scalar and the new API context.

The character classes in regular expressions include metacharacters, such as \d that matches numbers, \s that matches Spaces, and. That matches any character. Individual literal characters can also be considered character classes because they match at least with themselves and, in case insensitive matching, with their case-switched counterparts. Therefore, think of a character class as any part of a regular expression literal that can match the actual components of a string.

About us

We are jointly maintained by Swift enthusiasts. We will share technical content based on Swift combat, SwiftUI and Swift foundation, as well as collect excellent learning materials.

Thanks to SwiftWeekly for cooperating with us to launch the Chinese edition of SwiftWeekly.

Weekly warehouse: github.com/SwiftCommun…

The follow-up will also translate a large number of information to our public account, interested friends, can join us