Lecture overview -- Keyboard shortcut: 'u'  Previous page: Infinite evaluations and error evaluations -- Keyboard shortcut: 'p'  Next page: Rewrite rules, reduction, and normal forms [Section] -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Lecture 4 - Page 7 : 27
Programming Paradigms
Evaluation Order and Infinite Lists
Infinite evaluations and error evaluations - clarification

What is the value of the following expressions?

((lambda (x) 1) some-infinite-calculation)

((lambda (x) 1) (/ 5 0))

Constant functions with problematic actual parameter expressions.

  • Different evaluation orders give different 'results'

    • The number 1

    • A non-terminating calculation/an erroneous calculation

  • Two different semantics of function application are involved:

    • Strict: A function call is well-defined if and only if all actual parameters are well-defined

    • Non-strict: A function call can be well-defined even if one or more actual parameters cause an error or enters an infinite calculation

Scheme is strict