Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Add @Private attribute when 0.10 is released #524

Closed
natke opened this issue Sep 20, 2019 · 0 comments
Closed

Add @Private attribute when 0.10 is released #524

natke opened this issue Sep 20, 2019 · 0 comments
Assignees

Comments

@natke
Copy link
Member

natke commented Sep 20, 2019

I removed this section from the style guide, as the @Private attributes does exist yet.

### Private or Internal Names ###

In many cases, a name is intended strictly for use internal to a library or project, and is not a guaranteed part of the API offered by a library.
It is helpful to clearly indicate that this is the case when naming functions and operations so that accidental dependencies on internal-only code are made obvious.
If an operation or function is not intended for direct use, but rather should be used by a matching callable which acts by partial application, consider using a name starting with `_` for the callable that is partially applied, and marking the function or operation as private with the <xref:microsoft.quantum.core.private> attribute:

```Q#
@Private()
operation _ApplyDecomposedOperation(decomposition : Int[], targets : Qubit[]) : Unit {
    // ...
}

I will add it back in once 0.10 is release

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants