implemented 'experimental' switch
This commit is contained in:
parent
e27ab36731
commit
4b7de4dc5e
12 changed files with 49 additions and 7 deletions
|
|
@ -495,3 +495,21 @@ identifier that can be used to enable or disable it:
|
|||
This is often better than disabling all warnings at once.
|
||||
|
||||
|
||||
experimental pragma
|
||||
-------------------
|
||||
|
||||
The ``experimental`` pragma enables experimental language features. Depending
|
||||
on the concrete feature this means that the feature is either considered
|
||||
too unstable for an otherwise stable release or that the future of the feature
|
||||
is uncertain (it may be removed any time).
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: nim
|
||||
{.experimental.}
|
||||
|
||||
proc useUsing(dest: var string) =
|
||||
using dest
|
||||
add "foo"
|
||||
add "bar"
|
||||
|
||||
|
|
|
|||
|
|
@ -488,7 +488,8 @@ Instead of:
|
|||
Using statement
|
||||
---------------
|
||||
|
||||
**Warning**: The ``using`` statement is highly experimental!
|
||||
**Warning**: The ``using`` statement is highly experimental and has to be
|
||||
explicitly enabled with the `experimental`:idx: pragma or command line option!
|
||||
|
||||
The using statement provides syntactic convenience for procs that
|
||||
heavily use a single contextual parameter. When applied to a variable or a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue