Skip to content

Advanced Topics and Configuration

Mine Starks edited this page May 23, 2025 · 3 revisions

Language Features

In Q# projects, the JSON manifest (qsharp.json) has an optional languageFeatures property, which is an array of opt-in configurations for the compiler. Features will come and go, and they are typically introduced as a means for users to preview a feature before it is stable. Currently, there is only one language feature: v2-preview-syntax.

Features are written to be compatible with each other. That is, no features will be mutually exclusive, and a package that depends on other packages does not need to know what features are enabled in those packages -- they will always be compatible with the user code. See more details on the design of language features here.

v2-preview-syntax

Changes to Q# syntax are always backwards-compatible until a major version. Put another way, minor and patch releases of the QDK will never break Q# syntax -- changes will only ever be additive. The v2-preview-syntax feature will enforce the pending syntax changes that will be made official in major version 2 of Q#. This is useful for checking the compatibility of your codebase with the next major version of the QDK, or just to be prepared for any upcoming breaking changes.

Clone this wiki locally