micropython

docs/rejected.txt

234:77038806cb40
2009-06-01 Paul Boddie Moved context verification back into the invocation code, as opposed to residing in the function body code. This is required because keyword arguments need to operate on adjusted frames, and such adjustments must therefore occur because keyword arguments are stored in their invocation frames. Renamed CheckClassContext to the more general CheckClass instruction. Made AdjustFrame operate on invocation frames again. Introduced explicit tests for class invocation since instantiators require an extra slot for each new instance. Fixed the "if" statement to employ conversion of expression results to boolean values. Split and improved test programs.
     1 Namespace Definitions
     2 =====================
     3 
     4 Attributes can be redefined in modules and classes, but this eliminates much
     5 of the potential for optimisation. However, names of classes and functions
     6 could be restricted to only refer to the same kinds of objects within the same
     7 namespace. If redefinition were to occur, or if multiple possibilities were
     8 present, these restrictions could be moderated as follows:
     9 
    10   * Classes assigned to the same name could provide the union of their
    11     attributes. This would, however, cause a potential collision of attribute
    12     definitions such as methods.
    13 
    14   * Functions, if they share compatible signatures, could share parameter list
    15     definitions.
    16 
    17 It is easier, however, to regard multiply defined classes and functions as
    18 non-constant and to either disallow optimisations or to actually prevent the
    19 program describing them from compiling.