Subroutines and Control Abstraction Flashcards Preview

Programming Languages Principles > Subroutines and Control Abstraction > Flashcards

Flashcards in Subroutines and Control Abstraction Deck (38)
Loading flashcards...
1
Q

What is a Control Abstraction?

A
2
Q

What goes on behind the scenes when calling a subroutine?

A
3
Q

What are the three main places when maintaining a stack?

A
4
Q

Calling Sequence Info:

A
5
Q

Function caller or callee tasks:

A
6
Q

One thing that can be done with procedures is inline expansion. What is this?

A
7
Q

What are some inline keywords in C and Ada?

A
8
Q

Parameter Passing Info:

A
9
Q

Parameter Passing by Value:

A
10
Q

Parameter Passing by Reference:

A
11
Q

Parameter Passing by Read Only:

A
12
Q

Parameter Passing by Sharing:

A
13
Q

Three modes in Ada for passing parameters:

A
14
Q

References in C++:

A
15
Q

Passing Parameters by Name:

A
16
Q

Some languages support named parameters that can be given an any order:

A
17
Q

Some languages support a variabled number of parameters:

A
18
Q

Many languages restrict what can be returned from a function. What are some examples?

A
19
Q

Generic Subroutines and Modules

A
20
Q

Implicit Parametric Polymorphism

A
21
Q

Explicit Polymorphic Generics

A
22
Q

What kind of types can be passed as a generic parameter?

A
23
Q

Implementation Options for Generic Parameters:

A
24
Q

(T/F)

In some languages, all instances share the same code at runtime.

A

True

25
Q

Constraints on Generic Parameters:

A
26
Q

Generic Parameters Constraints in Ada:

A
27
Q

Generic Parameter Constraints in Java:

A
28
Q

C++ templates are very powerful. Elaborate:

A
29
Q

What is an exception?

A
30
Q

What are some solutions for exceptions?

A
31
Q

In ML, what could be a good way to recover from an exception?

A
32
Q

What are some exception handling mechanisms?

A
33
Q

What can an exception handler do?

A
34
Q

Exception in Java:

A
35
Q

Exception Handling Techniques:

A
36
Q

Exception Handling Using a Table:

A
37
Q

What is the philosophy of exceptions?

A
38
Q

Explain Coroutines:

A