D.6 Example Usage: Non-interactively and Interactively (CLI)

Once students have some experience implementing language interpreters, they can begin to discern how to use the language itself to support features that are not currently supported in the interpreter. For instance, prior to supporting recursive functions in Camille, students can simulate support for recursion by passing a function to itself:

A set of two code lines in Camille for simulating support for recursion by passing a function to itself.
Description
Continuation of the code in Camille for simulating support for recursion by passing a function to itself, consisting of 36 lines.
Description

Other example programs, including an example more faithful to the tenets of object orientation, especially encapsulation, are available in the Camille Git repository at https://bitbucket.org/camilleinterpreter/camille-interpreter-in-python-release/. These programs demonstrate that we can create object-oriented abstractions from within the Camille language.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.29.145