summary refs log tree commit diff stats
path: root/doc/nims.rst
diff options
context:
space:
mode:
authorIco Doornekamp <github@zevv.nl>2019-01-10 17:57:21 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-01-10 17:57:21 +0100
commita5fe676f37cfabfec0b4ea1a2008fe82058a7059 (patch)
tree58a57e3ae6eeab904652bd96a96ff9891f597626 /doc/nims.rst
parent0bb76dde547ff9f3e80f7421d4f2c556d7aefc4d (diff)
downloadNim-a5fe676f37cfabfec0b4ea1a2008fe82058a7059.tar.gz
Added 'Limitations' section to nimscript manual listing the restrictions of the VM (#10209)
Diffstat (limited to 'doc/nims.rst')
-rw-r--r--doc/nims.rst25
1 files changed, 22 insertions, 3 deletions
diff --git a/doc/nims.rst b/doc/nims.rst
index 034ad1fda..6cc894b91 100644
--- a/doc/nims.rst
+++ b/doc/nims.rst
@@ -26,9 +26,28 @@ previous settings):
    ``$project.nim``. This file can be skipped with the same
    ``--skipProjCfg`` command line option.
 
-The VM cannot deal with ``importc`` because the FFI is not
-available. So the stdlib modules using ``importc`` cannot be used with
-Nim's VM. However, at least the following modules are available:
+Limitations
+=================================
+
+NimScript is subject to some limitations caused by the implementation of the VM
+(virtual machine):
+
+* Nim's FFI (foreign function interface) is not available in NimScript. This
+  means that any stdlib module which relies on ``importc`` can not be used in
+  the VM.
+
+* ``ptr`` operations are are hard to emulate with the symbolic representation
+  the VM uses. They are available and tested extensively but there are bugs left.
+
+* ``var T`` function arguments rely on ``ptr`` operations internally and might
+  also be problematic in some cases.
+
+* More than one level of `ref` is generally not supported (for example, the type 
+  `ref ref int`).
+
+* multimethods are not available.
+
+Given the above restrictions, at least the following modules are available:
 
 * `macros <macros.html>`_
 * `os <os.html>`_