suggestion let s2 = AnotherStruct(s: s1) // AnotherStruct.y は 12 に推論されるUse the phrase “is isolated” to describe values and types that are isolated to a global actor. For example, in the following code, MyType and m are isolated to the main actor: suggestion Sendable に関するあいまいさに注意してください。例えば、型は Sendable に準拠することができますが、Sendable への準拠を持たない、あるいは利用できない Sendable` への準拠を持つこともできます。これは、コンテキストがない状態で「nonsendable」と書くと、2 番目と 3 番目のケースの間であいまいになります。 Pay attention to possible ambiguity around Sendable: Types can c...@export attribute in Swift's language reference, which controls how function and method definitions are exported to client modules. Key Changes:
@export attribute with two arguments: interface and implementation ---- `interface` 引数は、呼び出し可能なシンボルの形式でインターフェイスのみがクライアントにエクスポートされることを指定する。定義(関数本体)は、インライン化、最適化、またはその他の目的でクライアントが利用できない。この引数を使用して、実装をクライアントから隠す。 - `implementation` 引数は、定義(関数本体)のみがクライアントにエクスポートされることを指定する。呼び出し可能なシンボルはバイナリに出力されず、クライアントは必要に応じて定義のコピーを出力する責任がある。この引数を使用して、新しい関数またはメソッドを導入し、アプリケーションバイナリインターフェイス(ABI)に影響を与えないようにする。- `interface` 引数は、呼び出し可能なシンボルの形式でインターフェイスのみがクライアントにエクスポートされることを指定する。定義(関数本体)は、インライン化、最適化、またはその他の目的でクライアントが利用できない。この引数を使用して、実装をクライアントから隠す。 - `implementation` 引数は、定義(関数本体)のみがクライアントにエクスポートされることを指定する。呼び出し可能なシンボルはバイナリに出力されず、クライアントは必要に応じて定義のコピーを出力する責任がある。この引数を使用して、新しい関数またはメソッドを導入し、アプリケーションバイナリインターフェイス(ABI)に影響を与えないようにする。a is being accessed here, but according to the earlier code examples, a is defined as a type SomeStruct<2>, not an instance. To access the static constant member x, this should likely be print(SomeStruct<2>.x) or a should be defined as an instance with let a = SomeStruct<2>(). print(SomeStruct<2>.x) // "2"を出力--> provided valuable context for understanding the historical notation. Consider preserving this information in a note or appendix for reference, especially since the document still mentions converting from older formats.== 演算子はその値に対する要件を指定します。これにより、2 つの整数ジェネリックパラメータが同じ値を持つことを要求したり、整数ジェネリックパラメータに特定の整数値を要求したりすることができます。' 整数のジェネリックパラメータの場合、`==` 演算子はその値に対する要件を指定します。これにより、2 つの整数ジェネリックパラメータが同じ値を持つことを要求したり、整数ジェネリックパラメータに特定の整数値を要求したりすることができます。let <#integer parameter#>: <#type>NSApplicationMain and UIApplicationMain attributes to specify they cause compile errors in Swift 6コードがファイルやモジュールにどのように構成されているかに関係なく、実行可能にするためにコンパイルした Swift のコードには、トップレベルのエントリポイントをマークするための次の方法のうち、いずれか 1 つだけを含めることができます: トップレベルの実行可能コードを含むファイル、`main.swift` ファイル、`main` 属性、`NSApplicationMain` 属性、または `UIApplicationMain` 属性。