1 | # Rick van der Zwet
|
---|
2 | # StudentID: 0433373
|
---|
3 | # Lecture 1
|
---|
4 | # $Id: lecture1.txt 246 2007-09-28 07:36:04Z rick $
|
---|
5 |
|
---|
6 | All quotes are based on the 7th edition of Concepts of programming
|
---|
7 | languages from Robert W. Sebesta, cause the 8th edition has not come in
|
---|
8 | yet
|
---|
9 |
|
---|
10 | ***Chapter 1 Review Questions***
|
---|
11 | 7)
|
---|
12 | Q: What is the disadvantage of having to many features in a language?
|
---|
13 | A: "If a language ... bizarre results" pg. 15 section 1.3.2.1
|
---|
14 |
|
---|
15 | 8)
|
---|
16 | Q: How can user-defined operator overloading harm the readability of a
|
---|
17 | program?
|
---|
18 | A: "Because the usual ... the program's readers" pg. 9
|
---|
19 |
|
---|
20 | 9)
|
---|
21 | Q: What is one example of a lack of orthogonality in the design of C?
|
---|
22 | A: "As examples of the lack ... affects its meaning" pg. 11
|
---|
23 |
|
---|
24 | 10)
|
---|
25 | Q: What language used orthogonality as a primary design criterion?
|
---|
26 | A: "Perhaps the most orthogonal programming language is ALGOL 68" pg. 11
|
---|
27 |
|
---|
28 | 11)
|
---|
29 | Q: What primitive control statement is used to build more complicated
|
---|
30 | control statements in languages that lack them?
|
---|
31 | A: "reaction to the poor readability ... goto statements severely
|
---|
32 | reduces program readability" pg 12
|
---|
33 |
|
---|
34 | 12)
|
---|
35 | Q: What construct of a programming language provides process
|
---|
36 | abstraction?
|
---|
37 | A: "A simple example ... use of a subprogram" pg 16
|
---|
38 |
|
---|
39 | 14)
|
---|
40 | Q: Why is type checking the parameters of a subprogram important?
|
---|
41 | A: "Type checking is an important ... the required repairs" pg 16-17
|
---|
42 |
|
---|
43 | 15)
|
---|
44 | Q: What is aliasing?
|
---|
45 | A: "Loosely defined, aliasing ... same memory cell" pg. 17 sect 1.3.3.3
|
---|
46 |
|
---|
47 | 16)
|
---|
48 | Q: What is exception handling?
|
---|
49 | A: "The ability of ... aid to reliability" pg. 17 sect 1.3.3.2
|
---|
50 |
|
---|
51 |
|
---|
52 | ***Chapter 1 Problem Sets***
|
---|
53 | 6)
|
---|
54 | Q: What common programming language statement, in your opinion, is most
|
---|
55 | detrimental to readability?
|
---|
56 | A: "I believe the use of statements like goto and return in the middle
|
---|
57 | of a program, which greatly reduce the reability"
|
---|
58 |
|
---|
59 | 10)
|
---|
60 | Q: What are the arguments for writing efficients programs even though
|
---|
61 | hardware is relatively inexpensive?
|
---|
62 | A: * Hardware might be inexpensive, but not powerfull looking to
|
---|
63 | embedded devices
|
---|
64 | * A function might get called many times, making the overall program
|
---|
65 | really slow
|
---|
66 |
|
---|
67 | ***Chapter 2 Review Questions***
|
---|
68 | 11)
|
---|
69 | Q: What control flow statements were added to Fortran IV to get Fortran
|
---|
70 | 77?
|
---|
71 | A: "Fortran 77 retained most ... optional Else clause" pg. 59 sect. 2.3.5
|
---|
72 |
|
---|
73 | 12)
|
---|
74 | Q: Which version of Fortran was the first to have any soft of dynamic
|
---|
75 | variables?
|
---|
76 | A: "Fortran 90 ... This is a radical ... only static data" pg 49 sec.
|
---|
77 | 2.3.5
|
---|
78 |
|
---|
79 | 20)
|
---|
80 | Q: What missing language element of ALGOL 60 damaged its changes for
|
---|
81 | widespread use?
|
---|
82 | A: "Most important amoung ... too machine dependent" pg. 61 sect. 2.5.6
|
---|
83 |
|
---|
84 | 30)
|
---|
85 | Q: What features of SIMULA 67 are now important parts of some object
|
---|
86 | oriented languages?
|
---|
87 | A: "The primary goal was ... classes and inheritance" pg. 101 sec.
|
---|
88 | 2.16.1
|
---|
89 |
|
---|
90 |
|
---|