Skip to content

The description of usage of Builtin and Predefined class in <Evaluation of an Expression> is incorrect? #9

@CallmeNezha

Description

@CallmeNezha

Hi, I am new to mathics. When reading the document of how to extend mathics, I found the description of usage of Builtin and Predefined maybe incorrect.
In chapter of evaluation.rst, it says

Functions which take no parameters are generally subclassed off of the Builtin class.
However when a function takes parameters it method’s Object class is derived either directly indirectly from the Predefined class rather than the Builtin. To figure out which apply method in the class object to call, each method’s document string (or docstring) is consulted. The lookup process is kicked off using the evaluate() method found in the Predefined class.

And when I contiue to read the document of Hello, World! – using Predefined and Introducing the Builtin Class also with the source code of Builtin and Predefined class, I found the description above is quite opposite.

https://github.com/Mathics3/mathics-development-guide/blob/6b5e3c92089eeed69528ba005afe04e5a4ae94d0/docs/extending/developing-code/code-overview/evaluation.rst

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions