# HG changeset patch # User Paul Boddie # Date 1386597371 -3600 # Node ID dad7378cb29e7323669d1ec4151cf0b3df05d3be # Parent e451c17f1953ccefca5224ca07450923a3b99eca Added some notes about syspython's role in implementing native functionality. diff -r e451c17f1953 -r dad7378cb29e docs/native.txt --- a/docs/native.txt Sun Dec 08 18:34:39 2013 +0100 +++ b/docs/native.txt Mon Dec 09 14:56:11 2013 +0100 @@ -2,14 +2,25 @@ =========================== Native functions are principally associated with the facilities of the -builtins module. Although a Python module is provided to define the contents -of this module (referenced via the __builtins__ module name in programs), -unlike other modules, it is not generally desirable to translate the code of -the builtins module literally; instead, native functions are provided which -define the functionality, and these functions are invoked internally in the -RSVP machine. +builtins and native modules. Although Python modules are provided to define +the contents of these modules (the former referenced via the __builtins__ +module name in programs), unlike other modules, it is not generally desirable +to translate the code of such modules literally. Instead, native functions are +provided which define the functionality, and these functions will be provided +by the eventual platform-specific implementation. However, some definitions found in the builtins module should be translated, since it is possible to define the behaviour of these objects efficiently in Python. Such definitions employ docstrings, indicating that the contents of -the object definitions are to be traversed by the code generator. +the object definitions are to be traversed by the code generator. Other +library modules can also be translated. + +In addition to module functionality, some features of generated programs will +also be defined in terms of native code. The intention is to implement such +code in syspython (see syspython.txt), where the semantics of the language can +unambiguously and explicitly support the low-level operations required. In +other words, since syspython does not need to support the breadth of Python +semantics, certain elements of the syntax can be repurposed for low-level +operations without conflicting with the expression of conventional program +semantics (which will have been rewritten in other terms in the translation +process).