Reading Exercise #1
Due 5:00 PM, Monday Jan. 12, 2015
Chapter 6 (pp 217-287)
How to turn in a reading exercise
To turn in an exercise, repeat each question along with your answers. You might do this
by cutting and pasting from the exercise, or by printing it out, and writing your
answers on the printout, and then scanning your result into a PDF that you
can submit via the drop box function of D2L. Submit only *.txt or *.pdf or *.html
documents to D2L. It is your responsibility that exercises are in the correct format with your
name at the top in the first line.
Reading Exercise #1 Tom Smith firstname.lastname@example.org
Content of reading exercise #1
- Compare and contrast the information contained in precedence and associativity rules
with the information contained in order of evaluation rules for expressions.
- Compare and contrast iteration and logically controlled loops.
- List the control flow mechanisms. Some control flow mechanisms are
used predominately in Imperative, Functional, and Logic languages. For each
type of language list the control flow mechanisms most commonly associated
with that type of language.
- What are the differences between a value-model of variables and a reference model of variables?
- Why do many languages leave the order of evaluation of the arguments to functions unspecified?
- Describe 3 different search strategies that might be used to implement a
case statement. Describe the circumstances where each would be desirable.
- What is tail recursion? Why is it important?
- How does lazy evaluation differ from normal order evaluation?
- Why is initialization of variables important? In some languages it is
either hard (or expensive) to tell if a variable has been initialized when
it is used. Why?