experimental top-level constant
_Experimental
const experimental
Used to annotate a library, or any declaration that is part of the public interface of a library (such as top-level members, class members, and function parameters) to indicate that the annotated API is experimental and may be removed or changed at any-time without updating the version of the containing package, despite the fact that it would otherwise be a breaking change.
If the annotation is applied to a library then it is equivalent to applying the annotation to all of the top-level members of the library. Applying the annotation to a class does not apply the annotation to subclasses, but does apply the annotation to members of the class.
Tools, such as the analyzer, can provide feedback if
- the annotation is associated with a declaration that is not part of the public interface of a library (such as a local variable or a declaration that is private) or a directive other than the first directive in the library, or
- the declaration is referenced by a package that has not explicitly indicated its intention to use experimental APIs (details TBD).
Implementation
const _Experimental experimental = _Experimental();