Names, Scopes, Binding, and Control Flow Flashcards

1
Q

What is the main driving force behind the design of modern languges?

A

Ease of programming

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

High level programming is more a______

A

Abstract

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

Abstraction means that complexity becomes

A

Manageable

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

What do the following mean:

Name

Binding

Scope

Binding Time

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

What is static binding vs dynamic binding?

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

Early binding times have greater ____

Late binding times have greater _____

A

Early binding times: greater efficiency

Late binding times: greater flexibility

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

What is the difference between compiled and interpreted languages?

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

What is the lifetime of name-to-binding?

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

What is a dangling reference?

A

When the object’s lifetime is less than the binding’s lifetime

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

What is the scope of a binding?

A

The textual region of the program in which the binding is active

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

What is the difference between the following storage allocation mechanisms:

Static

Stack

Heap

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

What is static allocation

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

What is stack-based allocation?

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

What is a Frame for a subroutine call?

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

What is heap allocation?

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

For heap allocation, what are the differene between the following allocation algorithms:

first fit, best fit

pool allocation

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

Examine some of the differences between explicit deallocation and implicit deallocation?

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

What is a subroutine entry?

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

What is a subroutine exit?

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

What is a referencing environment?

A
22
Q

What is static scoping?

A
23
Q

What are some important things for scope rules

A
24
Q

Examine the following nested subroutine graphic:

A
25
Q

What are static links?

A
26
Q

What is declaration order?

A
27
Q

Examine the following examples for declaration order:

A
28
Q

What is dynamic scoping?

A
29
Q

Examine the following dynamic scoping examples;

A
30
Q

What is a referencing environment?

A
31
Q

What is shallow binding vs deep binding?

A
32
Q

What is subroutine closure?

A
33
Q

Why does binding time matter with static scoping?

A
34
Q

Consider the following deep binding example:

A
35
Q

What are the following:

First-class values

Second-class values

Third-class

A
36
Q

Examine the following with regards to first-class subroutines:

A
37
Q

What are lambda expressions?

A
38
Q

Examine the following lambda function examples:

A
39
Q

What is sequencing’s role in imperative and functional languages?

A
40
Q

What is recursion’s role in imperative and functional languages?

A
41
Q

Does logic programming have control flow

A
42
Q

What are the differences between:

prefix

postfix

infix

A
43
Q

What is the difference between the value model and the reference model?

A
44
Q

What are the following:

  • call by value
  • call by reference
  • call by sharing
  • call by name
  • call by need
A
45
Q

What is short circuiting?

A
46
Q

Is recursion generally more efficient that iteration?

A

No

47
Q

What type of recursion is as fast as iteration? How?

A
48
Q

What is applicative evaluation order?

A
49
Q

What is normal-order evaluation order?

A
50
Q

What is lazy vs strict evaluation?

A

Lazy evaluation stops evaluating params when it knows the result: