

Issue #194
source link: https://swiftweeklybrief.com/issue-194/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Issue #194 23 Sep 2021
Written by: Kristaps Grinbergs
How many of you have pre-ordered the new iPhone 13? Tomorrow is the big day, when we can see the new device hit the store shelves. Apple claims that the new iPhone has a brand new dual-camera system, a super-fast A15 chip and a massive leap in battery life.
But we are here not only for the new and pretty iPhone colors – Xcode 13.0 was released just a couple of days ago along with Swift 5.5. Here’s a listing of Swift 5.5 updates. This is a big release, and it includes quite a few new features. The iOS 13.0 release notes can be found here. And the work to back-deploy concurrency features to older Swift versions has begun.
To keep running this project and send you this newsletter, we are inviting sponsors to reach out. Your support is very much appreciated and helps us cover the platform costs.
Thanks to everyone involved and let’s get straight to the news.
Interested in sponsoring Swift Weekly Brief? Learn more here.
News and community
Cory Benfield informed us that Swift Crypto 2.0.0 was released.
Starter tasks
SR-15218 [Compiler] Enhance interchangeable CGFloat/Double to allow interchange between optional
Commits and pull requests
salinas-miguel’s PR that removes the Swift project’s dependency on Foundation on macOS was merged.
Doug Gregor created a pull request to back-deploy concurrency.
Proposals in review
SE-0323: Asynchronous Main Semantics is under review.
Program setup generally occurs in the main function where developers expect to perform operations before other parts of the program are run. Objective-C, C++, and C have initializers that are run before the main entrypoint runs and can interact with Swift’s concurrency systems in ways that are hard to reason about. In the Swift concurrency model, the developer-written asynchronous main function is wrapped in a task and enqueued on the main queue when the main entrypoint is run. If an initializer inserts a task on the main queue, that task may be executed before the main function, so setup is performed after initializer tasks are run.
SE-0324: Relax diagnostics for pointer arguments to C functions is under review.
C has special rules for pointer aliasing, for example allowing
char *
to alias other pointer types, and allowing pointers to signed and unsigned types to alias. The usability of some C APIs relies on the ability to easily cast pointers within the boundaries of those rules. Swift generally disallows typed pointer conversion. See SE-0107 UnsafeRawPointer API. Teaching the Swift compiler to allow pointer conversion within the rules of C when invoking functions imported from C headers will dramatically improve interoperability with no negative impact on type safety.
Swift Forums
Ashley Garland introduced some experimental work for a new Swift Package Manager feature for snippets.
We all know that learning by example is great, especially for code. I wanted to create the smallest, simplest method of providing example code for Swift packages, and I’ve just landed some work in progress in the Swift Package Manager.
Filip Sakel pitched a proposal to refine property wrapper related initialization.
SE 0258 introduced property wrappers and SE 0293 expanded them with function-like declarations. Today, property wrapper initialization exhibits inconsistencies due to its growing versatility. Specifically, memberwise initializers use complex, poorly documented rules and projection initialization remains limited. This proposal will simplify synthesized memberwise initialization for types with wrapped properties and extend projection value initialization to include global, type, and local wrapped properties.
Jordan Rose started a discussion about removing the implicit initialization of Optional variables.
In Swift 6, optional variables become uninitialized by default, like all other variables. Locals and globals get a fix-it to add
= nil
. Properties only get that fix-it in a note attached to the error about leaving the variable uninitialized, since it’s not obviously the right thing to do, only the Swift 5 thing to do. A migrator could auto-apply that fix too though.
Finally
Recommend
-
195
페이지를 찾을 수 없음죄송합니다. 요청하신 파일이 삭제되었습니다.URL이 올바른지, 파일 소유자가 URL을 삭제하지 않았는지 확인하세요.Google Drive를 사용하여 작업하세요.Google Drive의 앱을 사용...
-
130
Eclipse Issue Open Call for Enterprise Java Participation Oct 10, 2017...
-
142
-
133
Add homebrew bottle #5 Closed
-
96
Comments What is the significance of "isntall" command in npm? Looking...
-
106
ANNOUNCEMENTS #29 Closed
-
11
Episode 194 Episode 194 - Is Scrum Really The Issue? As a follow-up to
-
5
字谈字畅 194:比较工整的无情对 钱 争予 | 2023/01/03
-
4
@learnHackerNoon LearnLets geek out. The HackerNoon library is now ranked by re...Receive Stories from @l...
-
4
Changelog #194 Aug 14, 2023 Commit: 2fbe69d Rel...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK