A theme throughout this chapter (and in Chapters 11 and 12) is that to add a new feature or concept to Camille, we typically add:
a new production rule to the grammar
a new variant to the abstract-syntax representation of the TreeNode variant record representing a Camille expression
a new case to evaluate_expr corresponding to the new variant
any necessary and supporting data types/structures and libraries
When adding a concept/feature to a defined programming language, we can either rely on support for that concept/feature in the defining language or implement the particular concept/feature manually (i.e., from first principles). For instance, we implemented conditional evaluation in Camille using the support for conditional evaluation found in Python (i.e., if/else). In contrast, we built support for local binding in Camille from scratch by defining an environment.
18.118.186.143