Concepts of Programming Languages

(Sean Pound) #1
Review Questions 437


  1. What are the advantages and disadvantages of static local variables?

  2. What languages allow subprogram definitions to be nested?

  3. What are the three semantic models of parameter passing?

  4. What are the modes, the conceptual models of transfer, the advantages,
    and the disadvantages of pass-by-value, pass-by-result, pass-by-value-
    result, and pass-by-reference parameter-passing methods?

  5. Describe the ways that aliases can occur with pass-by-reference
    parameters.

  6. What is the difference between the way original C and C89 deal with an
    actual parameter whose type is not identical to that of the corresponding
    formal parameter?

  7. What are two fundamental design considerations for parameter-passing
    methods?

  8. Describe the problem of passing multidimensioned arrays as parameters.

  9. What is the name of the parameter-passing method used in Ruby?

  10. What are the two issues that arise when subprogram names are
    parameters?

  11. Define shallow and deep binding for referencing environments of subpro-
    grams that have been passed as parameters.

  12. What is an overloaded subprogram?

  13. What is parametric polymorphism?

  14. What causes a C++ template function to be instantiated?

  15. In what fundamental ways do the generic parameters to a Java 5.0
    generic method differ from those of C++ methods?

  16. If a Java 5.0 method returns a generic type, what type of object is actually
    returned?

  17. If a Java 5.0 generic method is called with three different generic
    parameters, how many versions of the method will be generated by the
    compiler?

  18. What are the design issues for functions?

  19. What two languages allow multiple values to be returned from a
    function?

  20. What exactly is a delegate?

  21. What is the main drawback of generic functions in F#?

  22. What is a closure?

  23. What are the language characteristics that make closures useful?

  24. What languages allow the user to overload operators?

  25. In what ways are coroutines different from conventional subprograms?

Free download pdf