Cumulative Flashcards

1
Q

Adding a feature to a programming language to make it easier to do something that was already doable is called adding ANSWER.

A

syntactic sugar

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

Matz, the creator of Ruby thinks that it is less important to optimize the execution (efficiency) of a programming language and more important to optimize the efficiency of ANSWER

A

the programmers

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

A programming language is called ANSWER if it is executed by an interpreter rather than by first being compiled with a compiler.

A

interpreted

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

If the types of a programming language are bound at execution time rather than compile time, then the types are called ANSWER.

A

dynamically typed

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

In describing the properties of an object oriented language, encapsulation means ANSWER.

A

Data and behaviour are packaged together

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

In discussing object oriented languages objects are organized into a class tree to support the property of ANSWER.

A

inheritance

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

In discussing object oriented languages being able to handle objects of related type is called ANSWER.

A

Polymorphism

(Polymorphism has a different usage in the object oriented programming community than in the functional programming community)

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

The application that caused a significant increase in the popularity of Ruby was a web framework called ANSWER.

A

Rails

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

The concurrency approach used in Ruby is ANSWER.

A

threads

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

The command name for the ruby interpreter is ANSWER.

A

irb

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

In ruby true.class returns ANSWER

A

TrueClass

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

Ruby supports two common ways that boolean expressions are handled in programming languages. In one approach both subexpressions of a boolean operator are evaluated before the boolean operator is evaluated. In the other approach called ANSWER the first subexpression in a boolean expression is evaluated and if that is enough to know the result of the boolean expression, then the second subexpression is not evaluated.

A

short-circuit evaluation

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

In Ruby, normally when you try to add a String to a Fixnum, you get an error message saying that a String cannot be coerced to a Fixnum. This is because Ruby is ANSWER typed.

A

strongly

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

One way of checking types is to see what constructor was used to create an object that is a parameter. Another way of checking types is to wait until a method is sent to an object and see if it supports the methods. This second way is called ANSWER.

A

duck typing

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

A major claim in object oriented design philosophy is that you should code to ANSWER rather than code to implementation.

A

interface

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

The & notation in the line of Ruby def gerorge(&sam) is used to indicate that sam is ANSWER.

A

a code block

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

The : notation in the Ruby expressions :hi is used to indicate that hi is ANSWER.

A

a symbol

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

With respect to the value returned by the Ruby expression:
‘hi’ .object_id == ‘hi’ .object_id
You can say it ANSWER.

A

could be either true or false

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

With respect to the value returned by the ruby expression:
:hi.object_id== :hi.object_id
You can say it ANSWER.

A

will always be true

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

To execute a code block in Ruby that is passed to a method but does not appear on its parameter list, you use the keyword ANSWER.

A

yield

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

To execute a codeblock in Ruby that is passed to a method on its parameter list, you send that parameter the method ANSWER.

A

call

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

A code block is some lines of code surrounded by either curly braces or ANSWER.

A

do end

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

In Ruby the expression Fixnum.class returns ANSWER.

A

Class

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

The root of the inheritance hierarchy in Ruby is the class ANSWER.

A

Object (According to textbook in 2010)

BasicObject (Updated answer for Ruby 2.3)

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

In Ruby, the name of the method in the class Me that is automatically invoked when a new object of type Me is created with Me.new is ANSWER.

A

initialize

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

In Ruby, the @ is used to indicated that the variable @me is ANSWER.

A

an instance variable

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

In Ruby, the @@ is used to indicate that the variable @@me is ANSWER.

A

a class variable

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

In Ruby, by convention the ? in the method me? is used to indicate that me is ANSWER.

A

boolean

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

In Ruby, the mixin is used to solve the object-oriented programming problem of ANSWER.

A

multiple inheritance

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

The feature of programs being able to ‘write programs’ (creating application specific language features) is called ANSWER.

A

metaprogramming

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

In Ruby, if you declare a class with a class name that is already in use and put in it the definition of a new method, you have changed the functionality of the existing class (even if it is a predefined class like Fixnum). The property of Ruby that allows this is ANSWER.

A

open classes

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

When you send a message to a Ruby object, Ruby first looks at the methods that object supports, and then starts working the inheritance chain. If it still cant find the appropriate method, the message and its parameters get passed as a message to the object looking for a method called ANSWER.

A

method_missing

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

In the Ruby community, the acronym DSL is an abbreviation for ANSWER.

A

domain specific language

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

In Ruby, if a line starts with a method name, that method is being sent to the object named ANSWER.

A

self

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

When you define a method in a class, normally it is meant to be invoked on an object of that class (an instance method). Sometimes it is meant to be invoked on the class name itself (a class method), like Date.parse( ‘3rd Feb 2001’). In Ruby, to define a class method we put ANSWER at the beginning of the method name in its definition.

A

self

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

Scala was designed to connect two programming paradigms, which were ANSWER.

A

object-oriented and functional

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

Another design goal for Scala was to have its programs easily interoperate with those written in ANSWER.

A

Java

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

Scala is ANSWER typed.

A

statically

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

Scala uses few type declarations because its compiler does ANSWER.

A

type inferencing

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

The main concurrency method used in Scala is ANSWER.

A

actors

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

In Scala, to indicate that a variable is immutable, you introduce it with the ANSWER keyword.

A

val

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

In Scala, to indicate that a variable is mutable, you introduce it with the ANSWER keyword.

A

var

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

In Scala, if I want to redefine a method that is defined in my parent class, I indicate this by using the keyword ANSWER.

A

override

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

The Scala feature closest to a Ruby mixin is the ANSWER.

A

trait

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

In Scala, the type that every type is a subtype of is called ANSWER.

A

Any

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

In Scala, the type that is a subtype of every type is called ANSWER.

A

Nothing

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

Many programming languages represent internal constants for types like strings, floats, and integers. Scala has the unusual distinction of having an internal constant representation for the type ANSWER, which is normally viewed as a format external to a program.

A

XML

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

The ! in Scala is used to ANSWER.

A

Send a message to an actor

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

In the chapter on Scala, we get the following interesting quote: ANSWER is the most important thing you can do to improve code design for concurrency.

A

Immutability

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

Instead of the + symbol, Haskell uses the symbol ANSWER for a string concatenation operator
.

A

++

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

The type of a string constant in Haskell by default is written ANSWER.

A

[Char]

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

In Haskell, you use the keyword ANSWER to collect related code into a similar scope.

A

module

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

In Haskell, if I define a function double x = x + x its type signature would be ANSWER.

A

(Num a ) => a -> a

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

In Haskell, instead of writing something like if x ==0 then 1 else fact (x-1)*x, you can write a series of lines starting with factorial 0 = 1. This second style is called ANSWER.

A

pattern matching

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

In Haskell, instead of writing something like if x==0 then 1 else fact (x-1) x, you can write a series of lines starting with | x > 1 = x factorial (x-a). This second style is called ANSWER.

A

using guards

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

In Haskell, instead of writing something like second x = head(tail(x)), you can write this without introducing the parameter x by using function composition. Doing that, you would define second by ANSWER.

A

second = head . tail

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

In Haskell, if I write (h:t) = [3 , 5 ,7], ANSWER is the value of h.

A

3

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

In Haskell, if I write (h:t) = [3, 5, 7], ANSWER is the value of t.

A

[5,7]

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

In Haskell, ANSWER is the output of zip [17…20] [10 , 8 ….4].

A

[(17,10),(18,8),(19,6), (20,4)]

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

In Haskell, ANSWER is the output of zip [20….17] [10,8…4]

A

[]

Default increment is 1 and zip only goes as far as shortest argument list

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

In Haskell, the anonymous function ANSWER causes the expression ‘map ANSWER [1,2,3]’ to produce [-4, -5, -6].

A

(\x-> - (x+3))

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

In Haskell, if we want to define a local named function inside a function definition, we use the keyword ANSWER.

A

where

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

In Haskell, the type signature of the function sum x y = x + y is ANSWER.

A

(Num a ) => a -> a -> a

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

In Haskell, given the definition sum x y = x + y, ANSWER is the value of that is produced by the expression (sum 3).

A

(\x -> 3 + x)

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

The way Haskell handles functions with more than one parameter is called ANSWER.

A

currying

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

In most languages, a function definition like f a b = a : (f (a + b) b) would result in an infinite recursion. However, in Haskell we can partially evaluate functions like this because Haskell is based on ANSWER.

A

lazy evaluation

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

Although Haskell is a statically typed language, we usually don’t need to write type declarations because Haskell uses ANSWER to handle the matter.

A

type inference

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

In Haskell, we can declare the type of a parameter to a function to be something specific like Num. However, we can also declare the type of a parameter to be something that could include many types like ListLike that supports the functions head and tail. We do this with a definition of ListLike that begins with the keyword ANSWER.

A

class

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

One of the three most significant parts of a monad is called ANSWER, which wraps up a function and puts it in the container.

A

return

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

One of the three most significant parts of a Haskell monad is called ANSWER, which unwraps up a function.

A

> > =

a bind function

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

In Haskell’s do notation for working with monads, assignment uses the ANSWER operator.

A

(left arrow)

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

Since Haskell doesn’t have traditional error handling mechanisms, by convention, people use the ANSWER monad to distinguish a valid return from an error return.

A

Maybe

This is similar to NaN’s usage in IEEE standard floating point arithmetic

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

Haskell, defining lists using a notation like [x*2 | x (left arrow) [3,4,5]] is called using ANSWER.

A

list comprehesions

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

In Haskell, [x*2 | x (left arrow) [3,4,5]] evaluates to ANSWER.

A

[6, 8, 10]

75
Q

In Prolog, the most natural way to express the fact that a lion is a cat is ANSWER.

A

cat(lion)

76
Q

In Prolog, the most natural way to express the query “what animals are cats?” is ANSWER.

A

animal(What), cat(What)

77
Q

In Prolog, the most natural way to express the rule that “I am an ancestor of you if I am a parent of you” is ANSWER.

A

ancestor(I, You) :- parent(I, You)

78
Q

In Prolog, the most natural way to express the rule that “I am an ancestor of you if I am a parent of an ancestor of you” is ANSWER.

A

ancestor(I, You) :- parent(I, Ancestor), ancestor(Ancestor, You)

(Both lines are one answer)

79
Q

In Prolog, the expression hi(X, 4) = hi(3, Y) causes X to have the value ANSWER.

A

3

80
Q

In Prolog, the expression hi(X, 4) = hi(3, Y) causes Y to have the value ANSWER.

A

4

81
Q

In Prolog, the expression hi(X, 4) = hi(3, X) causes X to have the value ANSWER

A

X will not be bound

82
Q

In Prolog, the expression [1, 2, 3] = [X | Y] causes X to have the value ANSWER.

A

1

83
Q

In Prolog, the expression [1, 2, 3] = [X | Y] causes Y to have the value ANSWER.

A

[2, 3]

84
Q

In Prolog, the expression X = [[1,2] | [3,4]] causes X to have the value ANSWER.

A

[[1, 2], 3, 4]

85
Q

In Prolog, the expression X = 1 + 2 causes X to have the value ANSWER.

A

1+2

86
Q

In Prolog, the expression 2 = 1 + X causes X to have the value ANSWER.

A

X remains unbound

87
Q

In Prolog, the expression that would cause an unbound variable X to take on the sum of the values of a bound variable Y and a bound variable Z is ANSWER.

A

X is Y + Z

88
Q

In Erlang, the main approach to concurrency is ANSWER.

A

actors

89
Q

In the Erlang community, ANSWER code refers to replacing pieces of your application without stopping your application.

A

hot-swapping

90
Q

An unusual built-in constant construct in Erlang lets us write «4:3,1:3» to represent the value ANSWER.

A

!

octal 41

decimal 33

hexidecimal 21

91
Q

Many syntax features of Erlang, such as ending statements with a period, reflect the influence of the programming language ANSWER.

A

Prolog

92
Q

In Erlang, you can link two processes together. Then when one dies, it sends ANSWER to its twin.

A

an exit signal

93
Q

The main programming paradigm in Erlang is ANSWER programming.

A

functional

94
Q

In Ruby, you would group methods into a class. In Erlang, you group functions into ANSWER.

A

a module

95
Q

The idea that when a process has an error, it is up to a monitoring process to determine what to do about the problem is referred to by the motto ANSWER in Erlang.

A

Let it crash

96
Q

Unlike most Lisp systems, Clojure doesn’t use its own custom virtual machine. It was originally designed to compile to code that would run on the ANSWER.

A

JVM

Java Virtual Machine

97
Q

The main programming paradigm for Clojure is ANSWER programming.

A

functional

98
Q

The loop and recur constructs are in Clojure to guide ANSWER.

A

tail recursion optimization

tail recursion elimination

99
Q

In Clojure, the value of (repeat 1) is ANSWER.

A

an infinite sequence of 1s

a lazy infinite sequence of 1s

100
Q

In Clojure, (take 3 (iterate (fn [x] (* 2 x)) 2)) produces ANSWER.

A

(4 8 16)

101
Q

The main Clojure approach to concurrency is called ANSWER.

A

Software Transactional Memory

STM

102
Q

In Clojure, ANSWER is a concurrency construct that allows an asynchronous return before computation is complete.

A

a future

103
Q

In Clojure, you cannot change a reference outside of ANSWER,

A

a transaction

104
Q

Three concepts related to concurrency were discussed with regards to the language Io. ANSWER was presented as a way to manage two execution streams that pass control back and forth between themselves.

A

coroutines

105
Q

Three concepts related to concurrency were discussed with regards to the language Io. ANSWER was presented as a general mechanism for sending a message to an object that would cause that object to respond to the message as a separate process running asynchronously.

A

Actors

106
Q

Three concepts related to concurrency were discussed with regards to the language Io. ANSWER was presented as a way to request that something be computed and then be able to continue computing until the result was needed. If the result was available then things would proceed as expected. If the result was not available, then a wait would be initiated until the result became available.

A

Futures

107
Q

Io is known for taking a ANSWER-based approach to object oriented programming.

A

prototype

108
Q

In Io, the basic method for creating a new object is ANSWER.

A

clone

109
Q

In Io, the type of an object is generally the nearest ancestor that ANSWER.

A

has a name that starts with a capital letter

has a slot for the method type

110
Q

In Io, we create a singleton by redefining the method ANSWER.

A

clone

111
Q

In Ruby, the evaluation of arguments to a message are handled by the object sending the message. In Haskell, the runtime environment decides when and how much to evaluate an argument to a function. In Io, the evaluation of the arguments to a message is made by ANSWER.

A

the receiver of the message

112
Q

In Io, a message has three aspects that can be interrogated by the call method. They are: the sender, the reciever, and ANSWER

A

the argument list

113
Q

Io allows programmers to play with its syntax, doing things like introducing a colon operator and redefining how curly braces are processed. This makes it easy to use Io to create ANSWER.

A

Domain Specific Languages

DSLs

114
Q

As one would expect in an object oriented language, when a message is sent to an object, the first thing the system does is to look for a corresponding method in that object. However, Io lets you change what happens next by redefining the method named ANSWER.

A

forward

115
Q

When viewing programming languages as natural languages, the word ANSWER is used instead of `words’.

A

tokens

116
Q

The routine in a compiler that takes as input a sequence of characters outputs these characters grouped into meaningful units is called ANSWER.

A

a lexical analyzer

117
Q

The specifications for how to group characters into meaningful units are traditionally written as ANSWER.

A

regular expressions

118
Q

The specifications of how to group characters into meaningful basic units of a programming language are generally implemented in code that has the abstract form of ANSWER.

A

a finite state machine

119
Q

When viewed abstractly, a language is defined as a set of ANSWER.

A

strings

120
Q

The Greek letter epsilon, when talking about languages, is used to represent ANSWER.

A

the empty string

121
Q

In automatically generating the code that reads characters and outputs the part of a programming language that is analogous to its words, we start with a specification and then traditionally convert it into code in two stages. In the first stage, we produce ANSWER.

A

a nondeterministic finite state machine

122
Q

In automatically generating the code that reads characters and outputs the part of a programming language that is analogous to its words, we start with a specification and then traditionally convert it into code in two stages. The main problem that can arise in moving from the first stage to the second stage is ANSWER.

A

an exponential explosion in the number of states needed

123
Q

The central idea of context-free grammars is to define a language by productions. These productions say that a nonterminal symbol can be replaced by ANSWER.

A

a sequence of terminals and nonterminals

a sequence of symbols

124
Q

The specific type of grammar that was the main focus of the portion of the Syntax Analysis chapter that was assigned was ANSWER.

A

LL(1)

125
Q

In a context-free grammar, the nonterminal that derives an entire member of the language being defined is called ANSWER.

A

a start symbol

126
Q

Using the context-free grammar based on the two rules A -> b A and A -> b, ANSWER would be the derivation sequence for bbb.

A

A => Ab => Abb => bbb

127
Q

ANSWER is the regular expression that corresponds to the language defined by the context-free grammar with the three rules A -> A a, A -> A b, A -> a.

A

a (a | b)*

That’s the bar, not a letter in between

128
Q

ANSWER would be the derivation of ((1)) in the language defined by the context-free grammar consisting of the two rules E -> ( E ) and E -> 1.

A

E => (E) => ((E)) => ((1))

129
Q

ANSWER are two derivations of the string cc that produce distinct syntax trees from the context-free grammar X -> X c Y , Y -> X, Y -> and X -> .

A

X => XcY => XcYcY => cYcY => ccY => cc
AND
X => XcY => XcX => XcXcY => cXcY => ccY => cc

130
Q

When a grammar can produce two distinct syntax trees for the same string, the grammar is said to be ANSWER.

A

ambiguous

131
Q

If I wanted to fix the grammar E -> E + E and E -> id, so that it would only produce one syntax, which is left recursive, the new grammar would be ANSWER.

A

E -> E + F and E -> F and F -> id

E -> E + F and E -> id and F -> id

132
Q

One aspect of the if then else end syntax of Ruby is that it avoids the ANSWER problem.

A

dangling else

133
Q

In the context-free grammar A -> B A , B -> A B, A -> B, A -> a, B -> b, and B -> the value of Nullable(A) is ANSWER.

A

true

134
Q

In the context-free grammar A -> B A , B -> A B, A -> a, B -> b, B -> the value of Nullable(A) is ANSWER.

A

false

135
Q

In the context-free grammar A -> B A , B -> A B, A -> B, A -> a, B -> b, and B -> the value of FIRST(A) is ANSWER.

A

{a,b}

136
Q

In the context-free grammar A -> B A , B -> A B, A -> a, B -> b, B -> the value of FIRST(A) is ANSWER.

A

{a,b}

137
Q

In the context-free grammar A -> B A , B -> A B, A -> B, A -> a, B -> b, and B -> the value of FOLLOW(A) is ANSWER.

A

{a,b}

138
Q

In the context-free grammar A -> B A , B -> A B, A -> a, B -> b, B -> the value of FOLLOW(A) is ANSWER.

A

{b}

139
Q

The context-free grammar A -> B A , B -> A B, A -> a, B -> b, B -> is not LL(1) specifically because ANSWER.

A

FIRST(BA) and FIRST(a) both include a, so we do not know which A rule to use

140
Q

When you write a parser for a context-free grammar that satisfies the LL(1) criteria by representing each non-terminal by a function that chooses what functions to invoke by the LL(1) criteria, this sort of parser is called ANSWER.

A

a recursive descent parser

141
Q

Programming languages that view programming as describing a step-by-step process to do something are called ANSWER languages.

A

imperative

142
Q

Programming languages that view programming as describing characteristics of the problem domain and characteristics of the solution and leaving it to the language processor to find a solution are called ANSWER languages.

A

declarative

143
Q

Each named object will have ANSWER, where the name is defined as a synonym for the object.

A

a declaration

144
Q

The technical term for connecting a name with an object is called ANSWER.

A

binding

145
Q

The portion of the program where the name is visible is called its ANSWER.

A

scope

146
Q

When the structure of the syntax tree is used to determine which object corresponds to a name, this is called ANSWER.

A

static scoping

147
Q

A compiler typically keeps track of which names are associated with which objects by using ANSWER.

A

a symbol table

148
Q

ANSWER data structures have the property that no operation on the structure will destroy or modify it.

A

immutable

149
Q

ANSWER data structures have the property that there are operations on the structure can destroy or modify it.

A

mutable

150
Q

Since a compiler may have to look up what object is associated with a name many times, it is typical to use ANSWER to avoid linear search times.

A

hash tables

151
Q

In the example interpreter for evaluating expressions, in the row labelled id, we have the code: v = lookup(vtable, getname(id)) ; if v = unbound then error() else v. It says getname(id) instead of id, because ANSWER.

A

id indicates a token with a type and value field

152
Q

In the example interpreter for evaluating expressions, in the row labelled id, we have the code: v = lookup(vtable, getname(id)) ; if v = unbound then error() else v. The value of v would be unbound in the situation that ANSWER.

A

getname(id) was not bound

153
Q

In the ICD textbook’s example interpreter for evaluating expressions, in the row labelled id(Exps), we have the code: args = EvalExps(Exps,vtable,ftable). We pass vtable to EvalExps to handle ANSWER.

A

expressions that contain identifiers

154
Q

In the ICD textbook’s example interpreter for evaluating expressions, in the row labelled id(Exps), we have the code: args = EvalExps(Exps,vtable,ftable). We pass ftable to EvalExps to handle ANSWER.

A

expressions that contain function usages

155
Q

In the ICD textbook’s example interpreter for evaluating expressions, in the row labelled let id = Exp1 in Exp2, we have the code: v1 = EvalExp(Exp1, vtable, ftable); vtableP = bind(vtable, getname(id), v1), EvalExp(Exp2, vtableP, ftable). The bind function changes vtable into vtableP by ANSWER.

A

inserting the binding of getname(id) with the value v1 into the table

156
Q

One approach to speeding up an interpreter is to translate pieces of the code being interpreted directly into machine code during program execution, this is called ANSWER.

A

just-in-time compilation

157
Q

The technical term for the compiler design methodology where the translation closely follows the syntax of the language is ANSWER.

A

syntax-directed translation

158
Q

Using the straightfoward expression translation scheme in the ICD 2nd edition textbook, if I were to TransExp(‘3 * x + 1’, vtable, ftable), newvar() will be invoked ANSWER times.

A

5

159
Q

Using the straightfoward statement translation scheme in the ICD textbook, if I were to TransStat(‘if true then z := 1 else z := 2’, vtable, ftable), newlabel() will be invoked ANSWER times.

A

3

160
Q

Using the straightfoward statement translation scheme in the ICD textbook, if I were to TransStat(‘while true do z := 1 + z’, vtable, ftable), newlabel() will be invoked ANSWER times.

A

3

161
Q

Using the straightfoward statement translation scheme in the ICD textbook, if I were to TransStat(‘while z < 3 do z := 1 + z’, vtable, ftable), newvar() will be invoked ANSWER times.

A

5

162
Q

When type checking done during program execution, the type system is called ANSWER.

A

dynamic typing

163
Q

When type checking done during program compilation, the type system is called ANSWER.

A

static typing

164
Q

ANSWER typing is when the language implementation ensures that the arguments of an operation are of the type the operation is defined for.

A

Strong

165
Q

ANSWER is the data structure used in language translation to track the binding of variables and functions to their type.

A

A symbol table

166
Q

The different traversals of a syntax tree done during compilation associate information with the nodes of the tree. The technical term for this kind of information is ANSWER.

A

attributes

167
Q

ANSWER means that the language allows the same name to be used for different operations over different types.

A

Overloading

168
Q

Some languages allow a function to be ANSWER, that is to be defined over a large class of similar types, e.g., over arrays no matter what type their elements are.

A

polymorphic

generic

169
Q

When a function is invoked, if the language passes a copy of the value of each parameter to the code that performs the function, this is called ANSWER.

A

pass-by-value

170
Q

If the system stack is used for a call stack, then it becomes important for the caller to update the top of the stack before copying items into it. The reason is because we are worried about the top of the stack being changed by ANSWER after we have copied in information but before we updated the stack top.

A

an interrupt

171
Q

The portion of the call stack associated with a single function invocation and execution is called ANSWER.

A

an activation record

172
Q

Another method of parameter passing, whose technical name is ANSWER, is implemented by passing the address of the variable (or whatever the given parameter is). Assigning to such a parameter would then change the value stored at the address.

A

pass-by-reference

173
Q

In C, when you pass a function as a parameter to another function, it is implemented as passing ANSWER.

A

the address of the start of the function code

174
Q

The practice of rewriting existing code to improve its design is called ANSWER.

A

refactoring

175
Q

ANSWER is the name of the code smell for when an instance method doesn’t rely on the state of the instance.

A

utility function

176
Q

ANSWER is the name of the code smell for when the same two or three items frequently appear together in classes and parameter lists, or when a group of instance variable names start or end with similar substrings.

A

data clump

177
Q

When you have two or three items that frequently appear together, the first step in fixing the problem is generally ANSWER.

A

put them in their own object

178
Q

The code smell called ANSWER occurs when a code fragment references another object more often than it references itself.

A

feature envy

179
Q

A popular Phil Karlton quote is: There are only two hard things in computer science - cache invalidation and ANSWER.

A

naming things

180
Q

A class that publishes a getter or setter for an instance variable invites client classes to commit the code smell called ANSWER.

A

inappropriate intimacy

181
Q

The prof thinks code should be broken into small pieces in order to make ANSWER easier.

A

re-using the code

Among other reasons

182
Q

Scalastyle was originally flagging println as bad practice because in most production code, the usage of println you see is debug messages and people should be using ANSWER instead.

A

a logging package

183
Q

The reason scalastyle complains about methods returning null can be seen by considering the type system of Scala. If I have a function that tests a parameter x to see if it is less than 3 and returns 2 if the test is true and null if the test is false, the type of the return value of the function would be ANSWER.

A

any

184
Q

The reason scalastyle complains about methods using return also has to do with the type system of Scala. If in the Scala repl if I define a parameterless function f as equal to 3, then f is of type Int. However, if I instead define the function to be equal to return 3, I get an error message telling me that f ANSWER.

A

needs a result type