12.10 Thematic Takeaways

  • Binding and assignment are different concepts.

  • The pass-by-value and pass-by-reference parameter-passing mechanisms are widely supported in programming languages.

  • Parameter-passing mechanisms differ in either the direction (e.g., in, out, or in-out) or the content (e.g., value or address) of the information that flows to and from the calling and called functions on the run-time stack.

  • Lazy evaluation is a fundamentally different parameter-passing mechanism that involves string replacement of parameters with arguments in the body of a function (called β-reduction). Evaluation of those arguments is delayed until the value is required.

  • Implementing lazy arguments involves encapsulating an argument expression within the body of a nullary function called a thunk.

  • There are two implementations of lazy evaluation: Pass-by-name is a nonmemoized implementation of lazy evaluation; pass-by-need is a memoized implementation of lazy evaluation.

  • The use of lazy evaluation in a programming language has compelling consequences for programs.

  • Lazy evaluation enables infinite data structures that have application in AI applications involving combinatorial search.

  • Lazy evaluation enables a generate-filter style of programming akin to the filter style of programming common in Linux, where concurrent processes are communicating through a possible infinite stream of data flowing through pipes.

  • Lazy evaluation factors control from data in computations, thereby enabling modular programming.

  • While possible, it is neither practical nor reasonable to support lazy evaluation in a language with provision for side effect.

  • The Camille interpreter operationalizes some language concepts and constructs in the Camille programming language from first principles, and others using the direct support for those same constructs in the defining language.

  • “The interpreter for a computer language is just another [computer] program” (Friedman, Wand, and Haynes 2001, Foreword, p. vii, Hal Abelson) is one of the most profound, yet simple truths in computing.

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

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