summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-04-24 09:34:20 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-04-24 09:34:29 +0200
commitee366f17469a96b418b58db17e03c892cf4f17d8 (patch)
treef066aac7a9a6dd11c498b90c073c26f7cff4c4b0 /doc
parent8ce9e434348f6f63b81f7a788bd4093996dbaca7 (diff)
downloadNim-ee366f17469a96b418b58db17e03c892cf4f17d8.tar.gz
.experimental can now be used to enable specific features
Diffstat (limited to 'doc')
-rw-r--r--doc/advopt.txt5
-rw-r--r--doc/manual.rst21
2 files changed, 11 insertions, 15 deletions
diff --git a/doc/advopt.txt b/doc/advopt.txt
index bf7dd7fb4..0d1578f78 100644
--- a/doc/advopt.txt
+++ b/doc/advopt.txt
@@ -35,7 +35,7 @@ Advanced options:
   --noLinking               compile Nim and generated files but do not link
   --noMain                  do not generate a main procedure
   --genScript               generate a compile script (in the 'nimcache'
-                            subdirectory named 'compile_$project$scriptext')
+                            subdirectory named 'compile_$$project$$scriptext')
   --genDeps                 generate a '.deps' file containing the dependencies
   --os:SYMBOL               set the target operating system (cross-compilation)
   --cpu:SYMBOL              set the target processor (cross-compilation)
@@ -88,5 +88,6 @@ Advanced options:
   --parallelBuild:0|1|...   perform a parallel build
                             value = number of processors (0 for auto-detect)
   --verbosity:0|1|2|3       set Nim's verbosity level (1 is default)
-  --experimental            enable experimental language features
+  --experimental:$1
+                            enable experimental language feature
   -v, --version             show detailed version information
diff --git a/doc/manual.rst b/doc/manual.rst
index f1330d524..636bf796b 100644
--- a/doc/manual.rst
+++ b/doc/manual.rst
@@ -1397,10 +1397,10 @@ dereferencing operations for reference types:
 
 Automatic dereferencing is also performed for the first argument of a routine
 call. But currently this feature has to be only enabled
-via ``{.experimental.}``:
+via ``{.experimental: "implicitDeref".}``:
 
 .. code-block:: nim
-  {.experimental.}
+  {.experimental: "implicitDeref".}
 
   proc depth(x: NodeObj): int = ...
 
@@ -5588,7 +5588,7 @@ dot operators
 -------------
 
 **Note**: Dot operators are still experimental and so need to be enabled
-via ``{.experimental.}``.
+via ``{.experimental: "dotOperators".}``.
 
 Nim offers a special family of dot operators that can be used to
 intercept and rewrite proc call and field access attempts, referring
@@ -6885,17 +6885,12 @@ is uncertain (it may be removed any time).
 Example:
 
 .. code-block:: nim
-  {.experimental.}
-  type
-    FooId = distinct int
-    BarId = distinct int
-  using
-    foo: FooId
-    bar: BarId
+  {.experimental: "parallel".}
 
   proc useUsing(bar, foo) =
-    echo "bar is of type BarId"
-    echo "foo is of type FooId"
+    parallel:
+      for i in 0..4:
+        echo "echo in parallel"
 
 
 Implementation Specific Pragmas
@@ -7917,7 +7912,7 @@ Example:
 
   # Compute PI in an inefficient way
   import strutils, math, threadpool
-  {.experimental.}
+  {.experimental: "parallel".}
 
   proc term(k: float): float = 4 * math.pow(-1, k) / (2*k + 1)