summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-09-13 08:46:24 +0200
committerAraq <rumpf_a@web.de>2012-09-13 08:46:24 +0200
commita783077cfde0f542c1cc155fde617b0ceb977b21 (patch)
treec39f054064849b12b6e9444d7582b2fac6a56cb7 /doc
parent23c3af80f60c1da49a1c979642e712358d960301 (diff)
downloadNim-a783077cfde0f542c1cc155fde617b0ceb977b21.tar.gz
splitted echo into echo/debugEcho
Diffstat (limited to 'doc')
-rw-r--r--doc/trmacros.txt13
1 files changed, 0 insertions, 13 deletions
diff --git a/doc/trmacros.txt b/doc/trmacros.txt
index e740e6890..d5ad74e6e 100644
--- a/doc/trmacros.txt
+++ b/doc/trmacros.txt
@@ -44,19 +44,6 @@ Fortunately Nimrod supports side effect analysis:
     echo "side effect!"
     result = 55
   
-  echo f() * 2 # and still optimized ;-)
-
-The reason is that the compiler does not consider 'echo' to have side effects
-for debugging convenience (this is comparable to Haskell's ``UnsafeIO`` monad).
-So lets try it with a "real" side effect: 
-
-.. code-block:: nimrod
-  template optMul{`*`(a, 2)}(a: int{noSideEffect}): int = a+a
-  
-  proc f(): int =
-    writeln stdout, "side effect!"
-    result = 55
-  
   echo f() * 2 # not optimized ;-)
 
 So what about ``2 * a``? We should tell the compiler ``*`` is commutative. We