summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorapense <apense@users.noreply.github.com>2015-06-08 16:03:57 -0400
committerapense <apense@users.noreply.github.com>2015-06-08 16:03:57 -0400
commitab1b1c9251f6d787cf78eefd2c3d1d391f5287fd (patch)
tree6c568deb46dbb713f3b8112ddfa3bb04fcd71b8b /doc
parentbbb1bdb4a939aa43ed981acc2f96bce918be7d21 (diff)
downloadNim-ab1b1c9251f6d787cf78eefd2c3d1d391f5287fd.tar.gz
Note about deprecation in generics.txt
I'm happy to change the wording or anything. It does seem like an important thing to mention, though. It might be better not to even mention typeless procs so as not to encourage bad behavior.
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/generics.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/manual/generics.txt b/doc/manual/generics.txt
index 2736f88fb..f82cad531 100644
--- a/doc/manual/generics.txt
+++ b/doc/manual/generics.txt
@@ -164,11 +164,13 @@ Alternatively, the ``distinct`` type modifier can be applied to the type class
 to allow each param matching the type class to bind to a different type.
 
 If a proc param doesn't have a type specified, Nim will use the
-``distinct auto`` type class (also known as ``any``):
+``distinct auto`` type class (also known as ``any``). Note this behavior is 
+deprecated for procs; templates, however, support them:
 
 .. code-block:: nim
   # allow any combination of param types
-  proc concat(a, b): string = $a & $b
+  proc concat(a, b): string = $a & $b # deprecated
+  proc concat(a, b: any): string = $a & $b # preferred
 
 Procs written with the implicitly generic style will often need to refer to the
 type parameters of the matched generic type. They can be easily accessed using