13的話
提醒一下 WWDC 就快到了。就算你沒有空參加,也要留點時間把第一天 Keynote、State of the Union 兩場看完。
很多人不知道這兩場的差別,前者其實是對媒體與大眾,介紹一些新功能、新名詞。後者才重點針對開發者,把新技術、新的 API 列出來,這樣你就知道接下來要追哪些 sessions。
🍴WWDC21 網站圖片玄機
是 Eat, Sleep, Code 的意思嗎?
💡WWDC21 Digital Lounges
今年多了直接跟 Apple 工程師的線上聊天室。6/1 開始免費註冊,人數有上限請把握機會。
🆕What’s New in Swift 5.5
覺得最近太閒、想預習 WWDC 的話可以先讀。先說,這網頁印成 A4 至少也要 25 頁。我把標題跟作者的相關推文列一下:
Async/await
![Twitter avatar for @twostraws](https://substackcdn.com/image/twitter_name/w_96/twostraws.jpg)
![A Swift 5.5 function marked with the async keyword. Inside it awaits three other asynchronous functions, then prints a final result.](https://substackcdn.com/image/fetch/w_600,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fpbs.substack.com%2Fmedia%2FE2fT6jrWUAArkKa.jpg)
Async/await: sequences
Effectful read-only properties
![Twitter avatar for @twostraws](https://substackcdn.com/image/twitter_name/w_96/twostraws.jpg)
![A Swift struct that loads a filename from the app bundle and returns its contents. The contents are available through a property that is marked both async and throws, because it might take time to execute and might fail.](https://substackcdn.com/image/fetch/w_600,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fpbs.substack.com%2Fmedia%2FE2fV2rAXMAY-deH.jpg)
Structured concurrency
![Twitter avatar for @twostraws](https://substackcdn.com/image/twitter_name/w_96/twostraws.jpg)
![Code that calculates the first 50 numbers of the Fibonacci sequence using Task so that it executes concurrently.](https://substackcdn.com/image/fetch/w_600,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fpbs.substack.com%2Fmedia%2FE2fUU6RXEAYP1-4.jpg)
async let
bindings
![Twitter avatar for @twostraws](https://substackcdn.com/image/twitter_name/w_96/twostraws.jpg)
![A Swift 5.5 function that uses async let to start three child tasks, then uses await to wait for all three to finish before using them together.](https://substackcdn.com/image/fetch/w_600,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fpbs.substack.com%2Fmedia%2FE2fULtcWYAIcO5c.jpg)
Continuations for interfacing async tasks with synchronous code
Actors
![Twitter avatar for @twostraws](https://substackcdn.com/image/twitter_name/w_96/twostraws.jpg)
![A Swift 5.5 actor that has a deck of cards and can safely trade them with another user.](https://substackcdn.com/image/fetch/w_600,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fpbs.substack.com%2Fmedia%2FE2fUiTaWYAUHZgB.jpg)
Global actors
![Twitter avatar for @twostraws](https://substackcdn.com/image/twitter_name/w_96/twostraws.jpg)
![A data controller class that uses @MainActor on its save() method, to ensure saving data is done safely.](https://substackcdn.com/image/fetch/w_600,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fpbs.substack.com%2Fmedia%2FE2fU2H-WEAIEbRt.jpg)
Sendable and @Sendable closures
#if
for postfix member expressions
![Twitter avatar for @twostraws](https://substackcdn.com/image/twitter_name/w_96/twostraws.jpg)
![A SwiftUI text view followed by a #if condition that attaches one of two font sizes depending on the operating system.](https://substackcdn.com/image/fetch/w_600,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fpbs.substack.com%2Fmedia%2FE2fVF-IX0AkMeZp.jpg)
Allow interchangeable use of
CGFloat
andDouble
types
![Twitter avatar for @twostraws](https://substackcdn.com/image/twitter_name/w_96/twostraws.jpg)
![A Swift snippet that shows a CGFloat being added to a Double with no problems.](https://substackcdn.com/image/fetch/w_600,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fpbs.substack.com%2Fmedia%2FE2fVYW-WUBETTFc.jpg)
Codable synthesis for enums with associated values
lazy
now works in local contextsExtend property wrappers to function and closure parameters
Extending static member lookup in generic contexts
And there’s still more…
☠️M1RACLES 漏洞
Apple Silicon M1 硬體層面的漏洞。實際上沒有那麼嚴重,不過這個網站的 FAQ 寫得很有趣,不怕英文的可以讀一下。
🫓iMac 有多薄
比 iPhone 一代還薄。
順便跟大家說一下,iMac(不算腳架)的體積只比 Mac mini 多 17.5%。
![Twitter avatar for @ethanhuang13](https://substackcdn.com/image/twitter_name/w_96/ethanhuang13.jpg)
🤪Random Tweets
論用 Twitter 學技術:
好孩子不要學:
![Twitter avatar for @keleftheriou](https://substackcdn.com/image/twitter_name/w_96/keleftheriou.jpg)
只要有螢幕的地方就能...
不知道從哪看到的我就想轉一下
This is fine.
🎙weak self podcast 76: 在家工作!WFH 時怎麼樣才不會 WTF
資深聽眾你沒有看錯,節目標題 reuse 了。這次是由有五年 WFH 經驗的波肥來分享絕招。
校正上架 了🤪
💼職缺/履歷交流區
求職履歷:
Richard Liu (LinkedIn)
如果你有 iOS 相關職缺或是求職履歷想要刊登在「13 的開發者週報」,請見關於。