Avatar
omochimetaru 1/5/2024 6:48 PM
Hello, Swift evolution! I wrote up a dedicated pitch detailing solutions to two fundamental issues with AsyncSequence and AsyncIteratorProtocol: the bespoke-and-limited @rethrows attribute, and issues with Sendable checking when iterating over an AsyncSequence. This includes the typed throws adoption in AsyncSequence and AsyncIteratorProtocol d...
6:48 PM
AsyncSequenceにprimary associated typeつく
6:49 PM
そしてFailureがtyped throwsに渡される
6:50 PM
謎の言語機能 '@rethrows’ はこれで消せるらしい
6:50 PM
それと、non Sendableな値をAsync Sequenceで扱えなかった(スレッド安全が壊れていた?)問題を修正するために (edited)
6:51 PM
新しいnextElementメソッドは引数でoptionalなisolated引数を持つ
6:53 PM
で、for await inの構文展開ではその引数も自動で展開される
6:55 PM
たしかこれまでのisolatedはActorを取らなきゃいけなくて、nonisolatedを示す方法がなかった この言語仕様が緩和される