Skip to Content
Programming Languages: Concepts and Implementation
book

Programming Languages: Concepts and Implementation

by Saverio Perugini
December 2021
Beginner
840 pages
47h 29m
English
Jones & Bartlett Learning
Content preview from Programming Languages: Concepts and Implementation

11.5 Chapter Summary

In this chapter, we implemented non-recursive and recursive, user-defined functions in Camille. In Camille, functions are represented as closures. We built three representations for the closure data type: an abstract-syntax representation (ASR), a closure representation (CLS), and a Python closure representation (i.e., lambda expressions in Python; Programming Exercise 11.2.12). When a function is invoked, we pass the values to be bound to the arguments of the function to the closure representing the function. For the ASR and CLS representations of a closure, a pointer to the environment in which the function is defined is stored in the closure (i.e., lexical scoping). For the Python closure representation (i.e., lambda ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Concepts and Semantics of Programming Languages 1

Concepts and Semantics of Programming Languages 1

Therese Hardin, Mathieu Jaume, Francois Pessaux, Veronique Viguie Donzeau-Gouge
Programming C# 10

Programming C# 10

Ian Griffiths

Publisher Resources

ISBN: 9781284222739