Programming Languages (CSC-302 98S)

[Instructions] [Search] [Current] [Changes] [Syllabus] [Handouts] [Outlines] [Assignments]


Assignment One: Language Design Issues

Assigned: Wednesday, January 21, 1998
Due: 11am, Wednesday, January 28, 1998

1. Language Evaluation

Choose a language that you know and use. Pick eight criteria from those given in lecture, the book, Hoare's article, or Wirth's article and evaluate the language according to those criteria. That is, for each criterion, evaluate how well or how poorly the language meets that criterion, motivate your evaluation, and, if possible, give an example that supports your argument.

2. Iteration vs. Recursion

Write a recursive and an iterative greatest common divisor function in Java (or Pascal, if you don't know Java). Write a program (or programs) that determines which is faster and by how much. If there a reason, other than execution speed, that you might prefer one function to the other?

Note that Louden presents Modula-2 code for both the iterative (page 9) and recursive (page 13) versions of the function.

3. Semantics of For

In English, describe as completely as you can the meaning of Pascal's for statement. Assume that you are speaking to a generally intelligent computer scientist who has not worked in Pascal.

4. Coercion in Pascal

In Pascal, integers can be assigned to real variables, but reals cannot be assigned to integer variables. What design principle does this violate? Would it be a good idea to allow reals to be assignable to integer variables? Why or why not? [Modified from Louden, p. 59, q. 5]

5. Simplifying a Language

Choose a feature that you think should be removed from some programming language (you can choose which language). Why should this feature be removed? What problems might arise as a result of this removal? [Modified from Louden, p. 59, q. 6]

6. Extending a Language

Choose a feature that you think should be added to some programming language (you can choose which language). Why should this feature be added? What needs to be stated about the feature for those implementing or using the language to understand it unambiguously? [Modified from Louden, p. 59, q. 7]


[Instructions] [Search] [Current] [Changes] [Syllabus] [Handouts] [Outlines] [Assignments]

Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.

Source text last modified Fri Feb 13 10:11:34 1998.

This page generated on Fri Feb 13 10:14:58 1998 by SiteWeaver.

Contact our webmaster at rebelsky@math.grin.edu