summary refs log tree commit diff stats
path: root/web
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-04-02 15:05:04 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-04-02 23:38:55 +0200
commitd587b6a25f9976abad9bf4b7039dd0c1f31b2913 (patch)
treea2afe70bb103abcc25bc76c749772a5363663f48 /web
parent6323b09f32fe92810fb23006e52ebd379efb2ca0 (diff)
downloadNim-d587b6a25f9976abad9bf4b7039dd0c1f31b2913.tar.gz
language addition: colon-block for expressions in let/var context
Diffstat (limited to 'web')
-rw-r--r--web/news/e031_version_0_16_2.rst13
1 files changed, 13 insertions, 0 deletions
diff --git a/web/news/e031_version_0_16_2.rst b/web/news/e031_version_0_16_2.rst
index 809910052..4c4cac129 100644
--- a/web/news/e031_version_0_16_2.rst
+++ b/web/news/e031_version_0_16_2.rst
@@ -96,6 +96,19 @@ remove the need for the ``newException`` template.
 - A new pragma ``.used`` can be used for symbols to prevent
 the "declared but not used" warning. More details can be
 found `here <http://nim-lang.org/docs/manual.html#pragmas-used-pragma>`_.
+- The popular "colon block of statements" syntax is now also supported for
+  ``let`` and ``var`` statements:
+
+.. code-block:: nim
+  template ve(value, effect): untyped =
+    effect
+    val
+
+  let x = ve(4):
+    echo "welcome to Nim!"
+
+This is particularly useful for DSLs that help in tree construction.
+
 
 
 Bugfixes