Where are @_attributes documented?

I want to submit some patches but I’m not sure whether I should apply some @_attributes(like @_transparent and @_semantics) that I see in stdlib to my API because I don’t know their meanings. Where are they documented?

I want to submit some patches but I’m not sure whether I should apply some @_attributes(like @_transparent and @_semantics) that I see in stdlib to my API because I don’t know their meanings.

If it starts with an underscore, the answer is always "no, unless you're the standard library". These attributes are compiler-internal and not intended to be used by user code. We reserve the right to change them with reckless abandon.

Where are they documented?

Some are documented in the compiler's 'doc/' subdirectory in various places.

-Joe

···

On Dec 30, 2015, at 4:58 PM, Ling Wang via swift-dev <swift-dev@swift.org> wrote:

Yes I’m submitting patches to stdlib. Thanks for pointing me to the doc folder.

···

On Dec 30, 2015, at 7:35 PM, Joe Groff <jgroff@apple.com> wrote:

On Dec 30, 2015, at 4:58 PM, Ling Wang via swift-dev <swift-dev@swift.org> wrote:

I want to submit some patches but I’m not sure whether I should apply some @_attributes(like @_transparent and @_semantics) that I see in stdlib to my API because I don’t know their meanings.

If it starts with an underscore, the answer is always "no, unless you're the standard library". These attributes are compiler-internal and not intended to be used by user code. We reserve the right to change them with reckless abandon.

Where are they documented?

Some are documented in the compiler's 'doc/' subdirectory in various places.

-Joe

Yes I’m submitting patches to stdlib. Thanks for pointing me to the doc folder.

Even if you're working on the stdlib, I wouldn't worry too much about using any internal attributes right away. The performance team usually handles adding those where needed.

-Joe

···

On Dec 30, 2015, at 7:42 PM, Ling Wang <an00na@gmail.com> wrote:

On Dec 30, 2015, at 7:35 PM, Joe Groff <jgroff@apple.com> wrote:

On Dec 30, 2015, at 4:58 PM, Ling Wang via swift-dev <swift-dev@swift.org> wrote:

I want to submit some patches but I’m not sure whether I should apply some @_attributes(like @_transparent and @_semantics) that I see in stdlib to my API because I don’t know their meanings.

If it starts with an underscore, the answer is always "no, unless you're the standard library". These attributes are compiler-internal and not intended to be used by user code. We reserve the right to change them with reckless abandon.

Where are they documented?

Some are documented in the compiler's 'doc/' subdirectory in various places.

-Joe

It’s a relief. Good to know. Thanks Joe.

···

On Dec 31, 2015, at 11:32 AM, Joe Groff <jgroff@apple.com> wrote:

On Dec 30, 2015, at 7:42 PM, Ling Wang <an00na@gmail.com> wrote:

Yes I’m submitting patches to stdlib. Thanks for pointing me to the doc folder.

Even if you're working on the stdlib, I wouldn't worry too much about using any internal attributes right away. The performance team usually handles adding those where needed.

-Joe

On Dec 30, 2015, at 7:35 PM, Joe Groff <jgroff@apple.com> wrote:

On Dec 30, 2015, at 4:58 PM, Ling Wang via swift-dev <swift-dev@swift.org> wrote:

I want to submit some patches but I’m not sure whether I should apply some @_attributes(like @_transparent and @_semantics) that I see in stdlib to my API because I don’t know their meanings.

If it starts with an underscore, the answer is always "no, unless you're the standard library". These attributes are compiler-internal and not intended to be used by user code. We reserve the right to change them with reckless abandon.

Where are they documented?

Some are documented in the compiler's 'doc/' subdirectory in various places.

-Joe