summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDean Thompson <deansherthompson@gmail.com>2019-02-10 02:56:28 -0500
committerAndreas Rumpf <rumpf_a@web.de>2019-02-13 23:30:14 +0100
commitf785286743589c2e089290e5f1a6567ecae5530f (patch)
tree4c2ed982f6ded946804af35289a4b7a94f3de89b
parentdcbab1031ace9ab33ebde3b293a5b6f2fc85eab0 (diff)
downloadNim-f785286743589c2e089290e5f1a6567ecae5530f.tar.gz
Expanded the typeinfo module's doc comment to warn that rtti will evolve and suggest alternative approaches. (#10596)
-rw-r--r--lib/core/typeinfo.nim15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/core/typeinfo.nim b/lib/core/typeinfo.nim
index cfb8f8f5d..32fedd0c1 100644
--- a/lib/core/typeinfo.nim
+++ b/lib/core/typeinfo.nim
@@ -8,12 +8,19 @@
 #
 
 ## This module implements an interface to Nim's `runtime type information`:idx:
-## (`RTTI`:idx:).
+## (`RTTI`:idx:). See the `marshal <marshal.html>`_ module for an example of
+## what this module allows you to do.
+##
 ## Note that even though ``Any`` and its operations hide the nasty low level
-## details from its clients, it remains inherently unsafe!
+## details from its clients, it remains inherently unsafe! Also, Nim's 
+## runtime type information will evolve and may eventually be deprecated.
+## As an alternative approach to programmatically understanding and
+## manipulating types, consider using the `macros <macros.html>`_ package to
+## work with the types' AST representation at compile time. See, for example,
+## the `getTypeImpl proc<macros.html#getTypeImpl,NimNode>`_. As an alternative 
+## approach to storing arbitrary types at runtime, consider using generics.
 ##
-## See the `marshal <marshal.html>`_ module for what this module allows you
-## to do.
+## 
 
 {.push hints: off.}