pl cram Flashcards

(23 cards)

1
Q

Design Issues

Character String Types

2

A
  1. Should strings be simply a special kind of character array or a primitive type?
  2. Should strings have a static or dynamic length?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Design Issues

Arrays

6

A
  1. What types are legal for subscripts?
  2. When are subscript ranges bound?
  3. When does array allocation take place?
  4. Are ragged or rectangular multidimensional arrays allowed, or both?
  5. Can arrays be initialized when they have their storage allocated?
  6. What kinds of slices are allowed, if any?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Design Issues

Unions

2

A
  1. Should type checking be required?
  2. Should unions be embedded in records?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Design Issues

Pointer Types

5

A
  1. What are the scope and lifetime of a pointer variable?
  2. What is the lifetime of a heap-dynamic variable?
  3. Are pointers restricted as to the type of value to which they can point?
  4. Are pointers used by dynamic storage management, indirect addressing, or both?
  5. Should the language support pointer types, reference types, or both?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Design Issues

Selection Structures

3

A
  1. What is the form and type of the expression that controls the selection ?
  2. How are the then and else clauses specified ?
  3. How should the meaning of nested selectors be specified ?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Design Issues

Multiple-selection statements

5

A
  1. What is the form and type of the expression that controls the selection?
  2. How are the selectable segments specified?
  3. Is execution flow through the structure restricted to include just a single selectable segment?
  4. How are case values specified?
  5. How should unrepresented selector expression values be handled, if at all?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Design Issues

Iterative control statements

2

A
  1. How is iteration controlled?
  2. Where should the control mechanism appear in the loop statement?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Design Issues

Counter-controlled loop statements

3

A
  1. What are the type and scope of the loop variable?
  2. Should it be legal for the loop variable or loop parameters to be changed in the loop, and if so, does the change affect loop control?
  3. Should the loop parameters be evaluated only once, or once for every iteration?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Design Issues

Controlled Loop Statements

2

A
  1. Should the control be pretest or posttest?
  2. Should the logically controlled loop be a special form of counting loop or a separate statement?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Design Issues

Loop Control Mechanisms

2

A
  1. Should the conditional mechanism be an integral part of the exit?
  2. Should only one loop body be exited, or can enclosing loops also be exited?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Design Issues

Subprograms

8

A
  1. Are local variables statically or dynamically allocated?
  2. Can subprogram definitions appear in other subprogram definitions?
  3. What parameter-passing methods are used?
  4. Are the types of the actual parameters checked against the types of the formal parameters?
  5. If subprograms can be passed as parameters and subprograms can be nested, what is the referencing environment of a passed subprogram?
  6. Can subprograms be overloaded?
  7. Can subprograms be generic?
  8. If the language allows nested subprograms, are closures supported?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Design Issues

Functions

3

A
  1. Are side effects allowed?
  2. What types of values can be returned?
  3. How many values can be returned?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What Languages…

Support negative subscripts?

3

A

Perl, Ruby, & Lua

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What Languages…

Support array slices with stepsizes?

3

A

Python, Perl, & Ruby

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What Languages…

Have no type coercions?

2

A

C & C++

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What Languages…

Include multiple assignments?

3

A

Perl, Ruby, & Lua

17
Q

What Languages…

Do not include a goto?

3

A

Python, Java, & Ruby

18
Q

What Languages…

Predefines iterators that can be explicitly called to iterate over its predefined data structures

1

19
Q

What Languages…

Borrows part of its design from Dijkstra’s guarded commands

1

20
Q

What Languages

Allow a variable number of parameters?

9

A
  1. C
  2. C++
  3. Java
  4. Python
  5. Ruby
  6. JavaScript
  7. Lua
  8. Perl
  9. C#
21
Q

What Languages…

Allow subprogram definitions to be nested

3

A

ALGOL 68, Pascal, & Ada

22
Q

What Languages…

Allow multiple values to be returned from a Function

2

23
Q

What Languages…

Allow the user to overload operators

4

A

Ada, C++, Python, & Ruby