Index

Non-alphabetical

!, 53

!in, 56

!is, 57

$, 11, 31, 95, 97, 379

&, 52, 58, 124, 371

&&, 59

&=, 60

*, 52, 54

*=, 60

*, 124, 367, 371

+, 53, 55

++, 50, 53, 367, 412

+=, 60, 415

+, 367, 371

,, 60

-, 53, 55

--, 50, 53, 367

-{}-main (compiler switch), 133

-0 (minus zero), 58

-=, 60, 415

-I (compiler switch), 340

-J (compiler switch), 37

-, 367, 371

-debug (compiler switch), 361

-release (compiler switch), 47, 97, 325

-unittest (compiler switch), 133

-v (compiler switch), 341

-w (compiler flag), 359

.., 50

..., 159, 386

., 66

/, 54

/=, 60

/, 371

<<, 55

<<=, 60

<<, 371

<=, 58, 375

<, 58, 375

==, 205, 375

=, 60, 376

>=, 58, 375

>>>, 55

>>, 55

>>=, 60

>>>=, 60

>>>, 371

>>, 371

>, 58, 375

?:, 59

@property, 50, 156, 380

@safe, 96

@system, 96

@trusted, 96

[], 50, 98, 100, 377

#define, 2

#if, 69

%, 54, 60, 371

~this, 186

^, 58, 60, 371

^^, 54, 60

__FILE__, 361

__LINE__, 361

|, 58, 60

||, 59

~, 22, 53, 55, 60, 100, 111, 121, 367

~=, 103, 104

1970s, 131

A

abstract character, 118

abstract class, 218, 219

abstract, 24, 218-221

abstraction

low-level versus high-level, 126

mechanism, 240

access protection, 203

access specifier, 199, 261

for structs, 261

accumulation, 410

accumulation function, 16, 157

adage, 337

adding method at runtime, 386, 387

addition, 55

additive expression, 55

address translation, 394, 395

address-of operator, 52, 124

aggregate contract, 331

aggregate function, 158

algebra, 165, 366, 373

algebraic type, 272

Algol, 6

algorithmic efficiency, 142

alias equality, 57

alias parameter, 148

alias this, 230, 263

alias, 149, 152, 240, 276-278, 347

aliasing, 121, 239

align, 268-269

alignment, 267

alignof, 269

allocation, 184

cost, 180

ambiguity, 80, 81, 147, 160

ambiguous-gender type, 15

ambush, 140

ancestor class, 191

angle brackets, 11

anonymous

unions and structs, 272

class, 226

function, see function literal 438

ANSI C, 315

antisymmetry, 144, 210

API, 329, 351

appending to array, 103

application logic, 328, 329

application shutdown, 407

approximate database search, 82

Aragón, Alejandro, xxvii

arbitrary behavior, 95

arithmetic operation, 373

array, 7, 386

allocating, 51

array-wise expression, 100, 101, 111

assigning to length, 106

bounds checking, 8, 95, 96, 98, 101, 108

during compilation, 108, 109

comparison, 100, 110

concatenation, 100, 111

contiguous, 112

conversion, 38, 109

copy semantics, 9

copying, 98, 101, 109

creation, 8, 93

dup, 110

duplicating, 94

dynamic, 93

empty, 95

expansion, 103, 104

filling, 101

fixed-size, 38, 107

global, 107

high-level, 126

indexing, 50, 108

initialization, 93, 107

with literal, 94

iteration, 108

jagged, 112

length, 8, 95, 108

changing during iteration, 75

length, 95, 106

literal, 39, 107

and immutability, 39

element type, 40

length, 39

low-level, 126

multidimensional, 111, 136

columns, 113

null, 95

of arrays, 52, 111

overlapping, 101

pass by value, 110

passing convention, 132

ptr property, 125

quick reference, 126

reallocation, 103, 104, 106

in place, 104

representation, 98

resizing, 102, 103, 106

safety, 126

shape, 112, 113

sharing, 98

shrinking, 102, 103, 106

slice, 101, 102

slicing, 10, 50, 97, 98, 109

sparse, 378

static allocation, 107

statically sized, 9

stomping, 105

uninitialized, 107

updating during iteration, 76, 77

array literal

element type, 39

Artificial Intelligence, 131

ASCII, 118, 119, 124, 338

Asian writing systems, 119

asm, 89, 392

assembly language, 89

assert(false), 326

assert, 46, 47, 97, 316, 317, 325, 326

ASSERT_ALWAYS, 325

AssertError, 46, 316, 317

assertion, 287, 314, 316

assignment

left-hand and right-hand side of, 42

operator, 60

user-defined, see opAssign 438

precedence, 60

associative array, 7, 8, 12, 15, 114, 115

in, 56

null, 114

byKey, 117

byValue, 117

comparison, 116

copying, 115

dup, 115

getting keys, 13

indexing, 50

insertion, 8

iteration, 77, 116, 383

keys, 117

length, 114

literal, 40, 114

lookup, 8

membership test, 56, 115

order of elements, 77

quick reference, 126

reading and writing, 115

remove, 116

removing element, 116

type, 114

user-defined key type, 117

values, 117

associativity, 58

of assignment, 60

asynchronous message, 398

ATL, 152

atomic, 424, 426

access, 416

increment, 426

operation, 412

primitive, 426

reads and writes, 413

attribute, 96, 156, 165

auto, 11, 93, 107, 153

automatic

conversions, 29

expansion, 164

memory management, 126

automaton, 33, 34

average, 20, 24

Average, 25

average, 159

B

back to the basics, 27

backslash, 34

bank account example, 415

base class, 191

Basic Multilingual Plane, 120

basic types, 29, 30

Baxter, Bill, xxvii

Bealer, Kevin, xxvii

binary code, 132

binary literal, 32

binary operator type, 45

binary resources, 37

binary search, 10

binary searching, 131

binary tree, 131

binding, 177, 242

binding contract, 314

bitfields, 47

bitwise

AND, 58

OR, 58

XOR, 58

bitwise complement, 53

blit, 247

block statement, 82

block structure, 6

block transfer, 247

body, 317, 320

boilerplate code, 369

BOM, see byte order mark 438

bool, 29, 32

Boucher, Travis, xxvii

bounds checking, 50, 51, 95, 96, 98, 101

braces, 66, 68, 82

break, 78

labeled, 80

breakage, 95

Brooks, Fred, 199

brute-force search, 142

build

non-release versus release, 96

release, 97

built-in type versus user-defined type, 365

byLine, 16

byte order mark, 337, 338

byte, 4, 29

C

C, 2, 4, 11, 14, 26, 29, 37, 42, 43, 50, 52, 58, 68, 103, 137, 139, 152, 188, 270, 272, 287, 299, 315, 317, 349, 351, 361, 395, 398

callbacks, 152

interfacing with, 359

tradition, 2

c (string literal suffix), 39, 123

C++, 2-4, 11, 15, 26, 29, 43, 50, 74, 86, 174, 180, 184, 198, 214, 226, 249, 272, 287, 299, 343, 349, 351, 395

interfacing with, 359

slicing, 26

C99, 30, 34

C#, 3, 11, 29, 198, 214, 226, 395, 417

cache, 393, 396

dedicated, 396

cache effects, 84

cache hierarchy, 414

cache miss bonanza, 112

call stack, 154, 382

calling convention, 359

calling method dynamically, 386

Calvin, 147

Cambrian explosion, 118

capacity, 392

Cardelli, Luca, 354

cas loop, 428

cas-based programming, 427

cas, 426

cascading if-else, 68

case sensitive, 210

case, 71, 79

Casinghino, Mike, xxvii

cast, 23, 45, 53, 193, 328, 369, 423

Castilla, Àlvaro Castro, xxvii

casting, 23

catch site, 301

catch, 65, 81, 82, 302, 303, 305, 309, 317

causality, 396, 408, 413

chains of comparisons, 58

Chang, Richard, xxvii

char[], 16

versus string, 17

char, 29, 39, 120, 121

character literal, 34

character type for string, 37

chef d’oeuvre, 13

child class, 191

chmod, 2

class, 15, 21, 51, 175, 177, 181, 183, 188-190, 200, 212, 214, 219, 221-223, 225, 226, 229, 230, 234, 261, 269

anonymous, 226

layout, 359

operator overloading for, 383

parameterized, 233

reference semantics, 177

classic multithreading, 395, 396, 416, 418

clear, 187, 188, 254

clearlsb, 430

clock rate, 393

closure, 153, 154

closures, 7

cluct, 246

Clugston, Don, xxvii

coalescing, 15, 104

code bloating, 139

code for “doing” versus “being”, 131

code point, 122

code shape, 138

code unit, 122, 123

coding standards, 202

coercion, 43

Cohen, Tal, 207

collateral exception, 307

collection, 380

combinatory, 140

come hell or high water, 85

comic strip, 147

comma expression, 60

command line, 1

parameters, 22

command line arguments, 102

command prompt, 2

comments, 3

common type of two values, 60

compact code, 139

compare-and-swap, 426

double-word, 426

comparison

for equality, 56, 57, see opEquals 438

for non-equality, 57

for ordering, 58, see opCmp 438

non-associativity of, 58

compilation model, 139

compile-time

expression, 69

function evaluation, 69

string manipulation, 47

compile-time constant, 108, 137, 188

compile-time enforcement, 405

compile-time evaluation, 171, 173

limitations, 174

compile-time function evaluation, 349, 388

compile-time introspection, 48

compile-time parameters, 383

compile-time selection, 69

compiler error messages, 141

compiler flags, 11

compiling programs, 2

complex number, 366

complexity, 139, 166

of connectivity, 392

compound statement, 66

compress, 157

computational density, 392

computational power, 393

computing industry, 393, 394

computing power density, 392

computing resources, 391

concatenation, 55, 100

concurrency, 391, 394

magic potion for, 426

model, 394

concurrent applications, 431

concurrent execution, 395

concurrent imperative language, 391

concurrent programming, 290

Concurrentgate, 392

condition, 316

conditional compilation, 69

conditional operator, 39, 59

configuration file, 341

conflict in function calls, 147

conjunction, 333, 334

connectivity hierarchy, 392

conservative, 179

consistency, 206

const, 136, 287, 297, 299

constant parameter, 136

constants

introducing, 4

constraint, 141

constructor, 24, 51, 181

forwarding, 183

overloading, 183

contention, 397

contiguity, 154

contiguous object, 230

contiguous portion of array, 97

contiguous storage, 132

continue, 78

labeled, 80

contract, 329

contract in interface, 334

contract programming, 313-336

contractual requirement, 316

control, 202

control character, 34

control flow, 83, 302

conversion

inefficiency, 374

shortest path rule, 46

convertible, 48

copy elision, 249, 251

copy-on-write, 122

copying files, 406

core dump, 47

core.gc, 52

core.memory, 187

core, 361

correctness, 424

counting words, see example 438

coupling, 180

cout, 4

covariant return type, 196

CPU, 393-397, 416

critical section, 392, 395, 414

cross-module overloading, 146

crosstalk, 392

curly braces, 5, 66

custom float, 366

cyclops, 413

Cygwin, 2

D

d (string literal suffix), 39, 123

dangling reference, 180

Darwin awards, 155

data, 131

common format, 139

initializing, 137

integrity, 413

topology, 154

visibility, 137

data block, 396

data bus, 393

data contention, 397

data hiding, see information hiding 438

data race, 392, 408

data sharing, 392, 395-397, 418, 431

underworld of, 431

data structure, 14

database programs, 131

datum, 393

DBCS, see double-byte character set 438

dchar, 29, 39, 120, 121, 124

dead assignment elimination, 185

deadlock, 418, 424, 425

cycle, 425

deallocated object, 187

debug, 361

debugger, 47

decimal literal, 32

declaration, 2, 70

decoupling, 199

decrement, 50, 378

default constructor, 182

default initialization, 178

default initializer, 30

default sharing, 424

default value, 184

default-share language, 398

default, 71, 79

deferred typechecking, 139

delegate, 41, 150, 382, 387

delete operator, 187

delete, 188

density, 393

density of integration, 392

dependency, 199

deprecated, 359

dereference, 52

dereference operator, 124

derived, 191

descendant, 191

descendant class, 191

design consistency, 214

desktop computer, 393

destructor, 86, 186-188, 195, 417

detective investigation, 393

deterministic finite automaton, 33

DFA, 33

diamond hierarchy, 229

dictionary, 8

Dilly, Stephan, xxvii

disambiguation, 143

discriminated union, 272

disjunction, 331

dispatch overhead, 198

distributed computing, 82

division, 54

by zero, 54

division operation, 46

divisor, 171, 172

dmd, 340, 351, 352

do while, 73, 78

documentation, 316

documentation comments, 358

Domain-Specific Embedded Language, 47, 388

double-byte character set, 345

double, 29

doubly initialized object, 184

download hamlet.txt, 13

dramatis personae, 14

DSEL, 47, see domain-specific embedded language 438

dstring, 39, 121

dual-purpose class, 419

dup, 94, 110

duplicating array, 94

duplication, 180

dynamic array, 93

dynamic dispatch, 386

dynamic inheritance, 387

dynamic language, 384

dynamic memory allocation, 51

dynamic method, 385

dynamic polymorphism, 15, 26

dynamic scripting, 47

dynamic type, 192

E

eager copy, 122

ease of maintenance, 131

edit-run cycle, 2

effect, 135

effect for expressions, 66

effect visibility, 395

Effective Java, 207, 396

efficiency, 47, 56, 96, 104, 112, 198, 230, 392

Eiffel, 226, 314

electromagnetic field, 392

ellipsis, 159, 386

else, 67, 70

embedded language, 395

embedding binary resources, 37

emoticon, 413

empty array, 95

empty statement, 67

empty, 155, 157, 380

encapsulation, 199-203, 212

encryption, 82

endianness, 361

ENFORCE, 325

enforce, 217, 325, 326, 377

English, 119

entity, 177

enum, 240, 272-276

base type, 274, 275

init, 275

max, 275

min, 275

enumerated type, 72

eponymous, 281

equality, 56

equally specialized functions, 144

equational reasoning, 181

Erlang, 395, 397, 398

error

at call site versus in implementation, 141

handling, 88, 301, 313, 406

isolation, 131

message, 46, 140

Error, 302, 317, 319

escape rules for synchronized, 419

Euclid’s algorithm, 170

€, 118

evaluation order, 50

event variable, 392

event-driven logic, 398

example

bank account, 415

bump, 135

counting words, 12

find, 132

frequency counting, 12

heights in feet and centimeters, 3

makeHammingWeightsTable, 83

stats, 20

transmogrify, 146

triangular matrix, 111

underscoresToCamelCase, 385

vocabulary building program, 7

exception, 72, 82, 301, 357

uncaught, 312

Exception, 302, 319, 326

exceptional path, 302

execution order, 357

exploit, 95

exponent, 34

exponential elbow, 394

exponential expansion, 393

exponential time, 166

export, 201-203, 261

expression

cast, 53

additive, 55

address-of, 52

bitwise

AND, 58

OR, 58

XOR, 58

bitwise complement, 53

comma, 60

comparison with screwdriver, 47

compile-time, 69

concatenation, 55, 100

division, 54

index, 11, 93

indexing, 50

logical

AND, 59

OR, 59

multiplicative, 54

negation, 53

new, 51

parenthesized, 46, 49

power, 54

primary, 49

quick reference, 61

remainder, 54

shift, 55

slice, 11

statement, 5

subtraction, 55

unary minus, 53

unary plus, 53

with no effect, 66

expression statement, 65

expressive power, 139

expressiveness, 230

extern, 359

F

factorization, 173

factory, 22

Factory design pattern, 211

factory, 210

false, 32

fat pointer, 132, 134

fetch-and-add, 426

Fibonacci, 166

field initialization, 184

FIFO, 398, 426

Filali, Karim, xxvii

file, 337

file attributes, 202

file copying, 406

file inclusion, 2

file suffix, 337, 348

final class, 199

final switch, 65, 72, 73, 78

final, 25, 197-199, 220, 240

finally, 65, 81, 82, 84, 306, 311

find, 17

fire-and-forget, 395

first match rule, 303, 405

first pass through a function, 137

float, 29

floating-point, 58

floating-point arithmetic, 366

floating-point literal, 33, 34

foldl, 157

for, 65, 74, 78

forcing identical mutexes for owned objects, 422

foreach, 3, 9, 65, 74, 78, 94, 113, 116, 161, 380, 381

on arrays, 75

with strings, 123

forehead slapping, 395

form follows function, 413

form follows structure, 6

formatted printing, 5

Fortin, Michel, xxvii

forwarding constructors, 183

fractal principles, 337

frame pointer, 150

french roast, 116

french vanilla, 116

frequency counting, see example 438

fresh symbol, 74

Friedl, J., 331

front, 155, 157, 380

function, 131, 149

address of, 152

array of, 152

frame, 150

higher-order, see higher-order function 438

literal, 149

nested, see nested function 438

overloading, see overloading 438

pointer to, 152

signature, 315

trailing parens in call, 156

variadic, see variadic function 438

function call operator, 50

function literal, 14, 40, 50

environment, 41

syntax, 41

type deduction in, 41

function, 41, 150

functional blocks, 392

functional language, 395, 397

functional programming, 290, 395

functional purity, 165

functional style, 288

functions

arguments, 6, 13

defining, 6

parameters, 6

fundamental types, 29

G

garbage collection, 52, 77, 154, 178, 180, 186-188, 195, 269

garbage collection, dangling reference, 269

GC.free, 187, 188

generality, 140

generated symbol, 74

generic argument, 149

generic function, 11

generic function arguments, 13

generic parameter, 149

getchar, 406

global guarantee, 391

global namespace, 341

global order of reads and writes, 414

global ordering of objects, 425

global scope, 341

global symbol access, 66

global variable, 398

global versus local connectivity, 392

glorified macro, 139

golden ratio, 131

goto case, 79

goto default, 79

goto, 15, 78, 82

good use of, 79

graph, 180

greater than, 58

greatest common divisor, 170

grouping with static if, 69

guarantee through convention, 412

guesstimate, 203

H

hackish flavor, 429

halt instruction, 326

Hamlet, 12, 14

statistics, 19

Hamming weight, 82

handshake, 396, 416

hard coding, 138

hard drive, 406

hardware crowd, 393

hardware developments, 392

hardware exception, 54

hardware industry, 391

hardware memory protection, 394

harmonic mean, 366

hashtable, 8, see associative array 438

haslsb, 430

haystack, 132, 141

head and tail of data, 420

header file, see module, summary 438

heap-allocated memory, 154

Held, David B., xxvii

Hello, world, 1

in Italian, 115

in Latin, 115

Helvensteijn, Michiel, xxvii

Helyer, Bernard, xxvii

Herlihy, Maurice, 426

hexadecimal literal, 32, 34

hexadecimal string literal, 36

hidden exit point, 302

hiding, 66, 67

high-level invariant, 398

higher-order function, 40, 148, 152, 153, 314

highly parallel architecture, 392

hijacking, 147, 215

HLT, 47, 326

Hobbes, 147

homogeneous versus heterogeneous translation, 139-140, 235-236

honor system, 412, 421

House, Jason, xxvii

how to get free coffee, 415

Hu, Sam, xxvii

Hume, Thomas, xxvii

hurting the few and the virtuous

as opposed to hurting the plebes, 416

I

IDE, 1

IEEE 754, 4, 34

if, 6, 67

illusion of data sharing, 393

immutable sharing, 431

immutable, 4, 17, 37, 38, 83, 121, 123, 287, 288, 290, 400, 401, 407, 412

constructor, 293

conversions, 295

method, 292

with array types, 38

imperative language, 397

implicit conversion, 46, 48, 140

implicit numeric conversions, 42

rules, 43

import paths, 37

import, 2, 37, 84, 122, 146, 338-349, 351, 352

public, 344

static, 347

renaming, 347

repeated, 2

selective, 346, 347

impossibility results, 426

impure (for object-oriented languages), 181

in place modification, 378

in, 7, 8, 56, 115, 135, 317, 320, 331

include, 37

incompatible function arguments, 141

increment, 50, 378, 412

indentation style, 5, 6

index expression, 93

indexed access with lists, 155

indexing, 50

indirection, 112

inefficiency, 139

infinite lifetime, 180

infinite loop, 407

infinite-precision number, 366

information, 199

information hiding, 199, 201, 337

inheritance, 24, 190, 191, 318, 329, 332

init, 7, 30, 51, 93, 106, 107, 120, 178, 181, 244, 251, 270

initialization, 30, 186

with void, 245

initialization order, 189

inject, 157

inorder traversal, 382

inout, 299

insertion and deletion in lock-free list, 429

int, 4, 29

integral literal, 32

integration density, 393

integrity, 125

Intel x86, 89

interconnectivity, 392, 393

interesting times, 392

interface, 199, 212-214

versus implementation, 212

interface, 21, 212, 214, 218, 227, 229

interleaving, 399

interlocked instructions, 426

interlocking, 395, 397

internal iteration, 381

internal logic, 324

interpreted language, 47

interpreter, 47

interpreting string, 47

interprocedural analysis, 421, 422

interval, 3

invariant, 314

invariant, 321, 334

inversion of control, 381

irreducible, 171

irreflexivity, 209, 210

is, 46, 100

expression, 48

for equality, 57

iteration, 3, 9, 100, 380

internal, 381

primitives, 380

state, 382

iteration index, 76

iterator

hierarchy, 157

Iterator pattern, 157

J

jack-of-all-trades, 386

Jacques, Robert, xxvii

jagged array, see array, jagged 438

Java, 3, 11, 29, 198, 214, 226, 272, 395, 417

java, 116

JavaScript, 386

junk mail, 405

K

K Desktop Environment, 329

K&R, 82, 406

K&R C, 315

Kamm, Christian, xxvii

Keep, Daniel, xxvii

Kegel, Mark, xxvii

Kelly, Sean, xxvii

Kernighan, Brian, 82, 315

keywords, 31

Khesin, Max, xxvii

kind, 49

Kjaeraas, Simen, xxvii

Klingon, 133

Koeninger, Cody, xxvii

Koroskin, Denis, xxvii

Kyllingstad, Lars, xxvii

L

label, 78, 221

labeled break, 80

labeled continue, 80

lambda function, 14, 40, 369

lambda functions, 7

lamp genie, 53

language abstraction, 391

large-scale development, 288

large-scale modularity, 337

Latin-derived writing systems, 119

laundering types, 299

lazy evaluation, 326

least significant bit, 429

least significant byte, 43

left-to-right evaluation, 50

legally acquired movie, 410

length, 8, 51, 95

Lesik, Igor, xxvii

less specialized function, 144

less than, 58

let me explain, 126

Letuchy, Eugene, xxvii

lexical order, 189, 357

lexical scope, 66

lifetime, 252

finite versus infinite, 239

LIFO, 86

limit applicability of function, 141

limiting function signature, 142

linear algebra, 239

linear congruential generator, 169, 172

periodicity, 169

linear search, 131, 148, 154

linguistic ability, 143

linked list, 132

linker, 133

Linux, 89

Liskov Substitution Principle, 329

Lisp, 7, 14

list, 180

list format, 139

literal, 46, 365

array, 39

binary, 32

character, 34

floating-point, 33, 34

hexadecimal, 32, 34

hexadecimal string, 36

integral, 32

octal, 32

string, 35, 38, 84

string, 122

suffix, 32

suffix of literal strings, 39, 123

type, 32, 33, 37

literals, 4

local alias, 147

local environment, 154

local versus global connectivity, 392

lock, 425

tyranny of, 426

lock-based

discipline, 424

program, 415

programming, 392, 418, 431

synchronization, 414, 418, 422

lock-free, 427

stack, 427

locking-intensive, 423

logic bug, 325

logical address, 394

logical AND, 59

logical character, 122

logical OR, 47, 59

logically deleted pointer, 429

long-range coupling, 180

long, 4, 29

lowering, 74, 85, 87, 379

of operators, 366

lvalue, 42, 52, 80, 101, 102, 135, 257, 265

defined, 42

versus rvalue, 42

M

Månsson, Pelle, xxvii

macro, 139

magic, 239, 379

mailbox, 404, 405, 410

crowding, 404, 410

main memory, 396

main, 1, 2, 102, 357

command line parameters, 22

return type of, 1

mainframe, 394

mainstream hardware, 395

maintainability, 193, 194

maintenance, 73

malloc, 52, 188

mangling, 359

mantissa, 34

manual memory management, 52

Masahiro, Miura, xxvii

masking, 66, 67, 81

massive concurrency, 418

math-fu, 144

math.h, 315

mathematical purity, 395

matrix, 239, 366

Matthews, Tim, xxvii

maximum, 20

maximum mailbox size, 410

Maya veils, 416

member access, 49

member initialization, 25

memcpy, 245

memory

architecture, 393

density, 393

hierarchy, 393

protection, 394

speed, 393

virtualization, 394

memory allocator, 104

overhead, 112

memory architecture, 395

memory barrier, 414

memory bus, 406

memory isolation, 398

memory recycling, 188

memory region, 51

memory safety, 126, 180, 188, 355

memory subsystem, 396

memory-unsafe feature, 125

message passing, 395-398, 431

versus memory sharing, 391

Message Passing Interface, 395, 398

message pump, 398

MessageMismatch, 402

method, 182, 190

not defined, 385

method invocation syntax, 156

metric, 202

Meyer, Bertrand, 175, 211, 314

Meyers, Scott, xxvii, 202

MFC, 152

Microsoft Windows API, 329

migration, 359

Milewski, Bartosz, xxvii, 246

miniaturization, 392

minimum, 20, 158

misaligned memory access, 267

mixin, 46, 47, 65, 82, 83, 282, 284, 386, 388

in operator definition, 368

mixin expression, 276

ML, 154

modern machine, 431

modern multithreading, 416, 418

Modula-3, 355

modular development, 337

modularity, 14, 23, 67, 84, 131, 199

module, 2

safe, 96

safety, 97

system, 96

trusted, 96

module, 133, 337, 348, 349, 351

constructor, 356, 357

destructor, 357

initialization order, 358

looking up names in, 341

searching roots, 340, 351

modules

initialization order, 189

modulus, 54, 171

floating-point, 54

Mohamed, Fawzi, xxvii

monomorphic, 15

Moore’s law, 392

more specialized function, 144, 145

most significant byte, 43

move, 251

moving context, 146

moving sofa constant, 39

MPI, see Message Passing Interface 438

multidimensional array, see array, multidimensional 438

multiple inheritance, 226, 230

multiple subtyping, 230

overriding methods with, 231

multiplication, 54

multiplicative expression, 54

multiport memory access, 396

multiprocessor, 396, 414

multithreaded application, 396

multithreading, 395

mutable data, 397

mutation, 165, 167, 395

mutex, 392, 395, 414, 415, 423, 424

acquiring in the same order, 425

ham-fisted, 426

modular acquisition, 425

mutual exclusion, 431

mutually referential structures, 26

Mythical Man-Month, The, 199

N

name hiding, 66, 67

name lookup, 176, 341

name resolution, 66

namespace, 23

naming convention, 385

NaN, see Not a Number 438

natural number, 53

needle, 132, 141

negation, 53

nested structs, 261

nested class, 51, 222

in function, 223

static, 225

nested function, 150

nested try/finally, 86

network drive, 410

network service, 406

new, 49, 51, 93, 94

considered harmful, 211

expression, 176

placement, 52

Newcomer, Ellery, xxvii

newline in string literal, 36

Niebler, Eric, xxvii

nomenclature, 191

non-associativity, 58

non-blocking linked-list, 429

non-equality, 57

non-local effect, 17

non-release build

versus release build, 96

Non-Virtual Interface, 213-215, 335

nonsensical argument, 141

nonzero, 378

nonzero bits in a byte, 82

nonzero value, 46

Not a Number, 54, 58, 181, 354

nothrow, 168, 315

null, 56, 114, 124, 178, 192, 206

numeric code, 366

numeric relation, 144

numeric types, 4

signed versus unsigned, 4

NVI, see Non-Virtual Interface 438

O

object, 177

branding, 185

construction, 184

life cycle, 181

location in memory, 178

tear-down, 188

tear-down sequence, 187

object orientation, 20

object serialization, 211

object-oriented programming, 175, 181

object.di, 276

Object, 203, 341

object, 341

octal literal, 32

octonion, 366

offer more, 329

OnCrowding, 411

OOP, see object-oriented programming 438

opAdd, 368

opApply, 381, 382

opAssign, 256, 257, 376

opBinary, 366, 371, 383

opBinaryRight, 371, 373

opCast, 369

opCmp, 117, 209, 210, 256, 375

opDispatch, 384-386

opDollar, 379

Open-Closed Principle, 20, 211

opEquals, 205-209, 256, 258, 259, 375

operator, 366

assignment, 60

precedence, 60

binary

type of, 45

conditional, 39, 59

function call, 50

unary

type of, 45

versus function call, 366

operator overloading, 366

$, 379

address, 388

ambiguity error, 371

binary, 371

defined in terms of assignment, 377

comma, 388

commutativity, 373

comparison, 375

conversion, 370

foreach, 380, 381

identity test, 388

if, 370

in classes, 383

in-place, 376, 377

index, 377

logical conjunction, 388

logical disjunction, 388

lowering, 366

overloading, 373

postdecrement, 369

postincrement, 369

predecrement, 369

preincrement, 369

quick reference, 388

slicing, 379

ternary operator, 370, 388

typeid, 388

unary, 367

operators, 4, 42

opHash, 117

Ophelia, 14, 19

opIndex, 377, 378

opIndexAssign, 378

opIndexUnary, 378

opMul, 368

opOpAssign, 376

opSlice, 379

opSliceAssign, 379

opSliceOpAssign, 379

opSliceUnary, 379

opSub, 368

optical disk, 406

optimization, 414

opUnary, 367

order of execution, 86

order of precedence, 42

order of top-level declarations, 146

ordering comparison, 58

organic operation, 428

orphaned method, 193

OSX, 2

out of order execution, 395

out-of-band message, 409

out-of-bounds access, 95

out, 7, 136, 319, 320, 332, 333

outer, 222, 232

overflow, 53

overflow bit, 373

overloading, 142, 143

cross-module, 146, 343

food chain, 143

rules, 145

too lax versus too tight, 143

override, 25, 191, 193, 194, 198, 220, 232

owned object, 423

owned subobject problem, 422

OwnedFailed, 409

owner thread, 407

owner-owned relationship, 422

OwnerFailed, 410

ownership graph, 409

ownership of objects, 421

OwnerTerminated, 408

P

package, 202

package, 200, 202, 203, 261, 337

padding, 267

palindrome, 102

parallel communication, 392

parallel execution, 165

parallel kernel, 394

parallelization, 395

parameter list, 138

parameter tuple, 161, 163

parameter type tuple, 161

parameterized class, 233

parameters

compile time vs. run time, 11

parent class, 191

parenthesized expression, 46, 49

Parker, Mike, xxvii

Parnas, David L., 200, 314

Parnell, Derek, xxvii

partial order, 145, 209

partial ordering, 144, 145

of functions, 144

Pascal, 4, 38

pass by reference, 400

pass by value, 110, 132

pass by value and reference, 6

pattern matching, 131

with receive, 403

peeling braces with static if, 69

Pelletier, Jeremie, xxvii

performance, 96

Perl

version 6, 58

Perlis, Alan, 297

persona, 15

PersonaData, 16-18

Phobos, 361

physical address, 394

physical character, 122

Pierce, Benjamin, 175

pipeline, 396

placement new, 52

platform dependencies, 360

pointer, 52, 56, 124, 412

arithmetic, 125

dereference, 52

indexing, 50

Russian roulette, 125

slicing, 51

unchecked, 125

pointer to function or delegate, 50

Polish democracy, 40

Polonius, 15

polymorphism, 180, 181, 240

popFront, 155, 157, 380

portable digital assistant, 393

postblit constructor, see this(this) 438

postcondition, 314, 319, 332

postdecrement, 50, 378

postincrement, 50, 378

pow, 6

power operator, 54

power-to-weight ratio, 131

precondition, 314, 317

predecrement, 53, 378

predicate, 148, 316

preincrement, 53, 378

premature optimization, 198

primality, 173

primary exception, 308

primary expression, 46, 49

prime factors, 171

primitive expression, 31

printf, 4, 47, 287

priority message, 409

priority queue, 398

PriorityMessageException, 410

prioritySend, 409

private state, 166, 167

private, 137, 200-203, 214-217, 261, 323, 329

process, 394, 395, 397

isolation, 394

processor state, 395

producer-consumer protocol, 406

program correctness, 313

program name, 103

program state, 152

program termination, 400

programming discipline, 131

programming model, 393

programming paradigm, 175, 394

programming practices, 11

programming-by-honor-system, 412

proper subtype, 191

property access syntax, 156

protected memory, 37

protected, 200-203, 216, 217, 232, 323

pseudo method, 156

pseudo-member notation, 156

pseudorandom, 169

ptrdiff_t, 278

public, 201-203, 212, 216, 217, 232, 261, 323

pure functional languages, 26

pure object-oriented languages, 26

pure, 165, 167, 315

putchar, 406

Python, 2, 6, 58, 343

Q

Qt, 152

qualifier, see type qualifier 438

shared, 397

qualifying a function name, 147

qualifying member name, 195

quaternion, 366

Queen, 19

queue, 398, 404, 409

quick reference

expressions, 61

statements, 89

quote, 36

quote character, 34

quoted string literal, 35

R

race condition, 415

races, 431

RAII, see Resource Acquisition Is Initialization 438

RAM, 393

random number generator, 169

range, 132, 157, 380

input, 157

range violation, 115

RangeError, 50, 51

raw data definition, 36

rdmd, 2, 133

read-modify-write, 106, 412

read-modify-write operations, 415

read-only, 37

read, 328

readf, 23

readText, 328

real, 29, 413

rebinding, 178

receive. Tuple, 404

receive, 403-405, 408

receiveOnly, 402, 404

receiveTimeout, 404

recursive definition, 191

recursive function, 11

red-black tree, 131

reduce, 157, 158

reductio ad absurdum, 210

redundant inheritance paths, 227

ref, 6, 7, 9, 76, 94, 108, 110, 113, 135, 136, 156, 243, 381

and conversions, 76

giving access, 378

refactoring, 67

reference implementation, 351, 353, 356

reference semantics, 15, 26, 177, 180, 239, 242, 246

reference versus object, 177

referential structure, 180

reflexive, 144

reflexivity, 206, 209

regex, 15, 17

regular expression, 15, 331

relational algebra, 131

relative primality, 170

relaxed memory model, 416, 418

release mode, 326

reliability engineering, 313

relocatable objects, 249

remainder, 54

removing method at runtime, 386

renaming in import, see import, renaming 438

reordering, 414, 416

reordering of field access, 421

require less, 329

resistance, 392

Resource Acquisition Is Initialization, 310

resource disposal, 188

resource leak, 310

return, 81, 319

reusability, 139

reverse video, 124

reversed turtles, 190

rewriting

for overloaded operators, 366

rigidity, 139

Ripolles, Pablo, xxvii

Ritchie, Dennis, 82, 315

Roberts, Brad, xxvii

root, 204

run-of-the-mill machine, 396

runaway process, 394

runnable thread, 396

runtime check, 313

rvalue, 42, 101, 102, 135, 182, 249, 251, 257, 265, 266

rvalue versus lvalue, see lvalue versus rvalue 438

Rynn, Michael, xxvii

S

safe interface, 96

safe module

versus system module, 96

safety, 95, 96

memory, see memory safety 438

of casts, 53

SafeD, 126, 391

Sailor, 19

Savas, Foy, xxvii

scaffolding, 131

Scala, 230

scalability, 84, 86, 392, 431

Schardt, Christof, xxvii

scheduler, 394

Schveighoffer, Steve, xxvii

scope(exit), 84, 85

scope(failure), 87

scope(success), 86

scope, 65, 84, 86, 240, 312, 366

scoped lifetime, 252

scoped locking idiom, 417

scoped object lifetime, 417

scoping with static if, 69

screwdriver compared with expression, 47

script, 2, 8

scripting, 387

scrubbing input, 327

search engine, 131

searching, 131

selective implementation of methods, 217

self-referential types, 26

semantically equivalent code, 74

semantics

compiler awareness of, 365

semaphore, 395

seminal work, 426

send, 402-404

separate compilation, 422

separation of concerns, 337

sequence of statements, 66

sequential consistency, 414

serial communication, 392

serialization of access, 415

setlsb, 430, 431

setMaxMailboxSize, 410

setMutex, 422

setOwner, 407

Shakespeare, William, 13

shallow copy, 9, 246

shared address space, 395

shared class, 427

shared data, 413, 415, 416

shared memory, 396

shared resource, 180

shared struct, 427, 428

shared, 287, 397, 398, 400, 401, 411, 412, 414, 419, 420, 423, 431

sharing of data between threads, 391

shebang, 338

shebang notation, 2

shell, 1

shift expression, 55

shift happens, 55

short-circuit, 58, 331

short, 4, 29

Shropshire, Benjamin, xxvii

shutdown protocol, 407

signal propagation speed, 393

signals and slots, 152

signature, 138, 141, 315

signature constraint, 141, 143, 367

signed, 74

silicon oxide, 393

Simcha, David, xxvii

simplicity, 1

single statements, 5

single-processor, 397

singly linked list, 308

singly-linked list, 427

lock-free, 429

sitcom cliché, 22

size_t, 276

sizeof, 276

skip list, 131

slack space, 104

slice, 381

slice of an array, 98

slicing, 11

slicing arrays, 50

smörgåsbord, 191

Smalltalk, 386

smart phone, 406

software crowd, 393

software engineering, 337

software industry, 391

something completely different, 384

sorting, 13

space-efficient storage, 378

sparse array, 378

spawn, 399, 402, 407

special symbols, 31

specialized hardware, 395

specialized versions of functions, 139

specification, 313, 314, 316

specification check, 328

speed gap between processor and memory, 393

speed of light, 393

split, 17

splitter, 8

SQL, 47

sqrt, 315

squint, 140

St. Jack, Graham, xxvii

Stachowiak, Tomasz, xxvii

stack, 233, 395

lock-free, 427

stack overflow, 107

stack unwinding, 309

stack variable, 398

standard deviation, 158

standard error, 357

standard library, 361

startsWith, 15

statement

asm, 89

block, 82

break, 78

compound, 66

continue, 78

deltas from existing languages, 65

do while, 73

empty, 67, 73

expression, 65

for, 74

foreach, 74

on arrays, 75

goto, 78

if, 67

mixin, 82

quick reference, 89

return, 81

scope, 84

static if, 68

switch, 71

synchronized, 88

throw, 81

top level, see top-level statement 438

try, 81

while, 73

with, 80

static class constructor, 189

static class destructor, 189, 190

static else, 70

static if, 48, 65, 68, 278

static import, see import, static 438

static information, 196

static this(), 188

static type, 192

static versus dynamic, 387

static, 137, 151, 176, 182, 196, 252, 260, 263

obligatory joke about overuse of, 345

statically scoped symbol lookup, 139

statistical encoder, 120

std.algorithm, 15, 157, 158, 178, 251

std.bitmanip, 47

std.c.fenv, 58

std.concurrency, 410, 412, 413

std.contracts, 325, 327

std.conv, 102, 161, 317

std.file, 328

std.random, 94, 174

std.range, 158

std.regex, 331

std.stdio, 2, 400

std.typecons, 163

std.utf, 122

std.variant, 386, 405

std, 361

stdout, 400

Stewart, Robert, xxvii

STL, 74, 157

stomping, 105

storage class, 6, 137

straw, 133

stream, 380

strict weak order, 209

stride, 122

string

character type of literal, 39

compiling into code, 83

concatenation, 22

fixed-size, 38

length of literal, 38

literal, 35

literal suffix, 39, 123

newline in literal, 36

quoted literal, 35

WYSIWYG literal, 35

string, 17, 37, 39, 118, 121, 122, 401

copying, 17

length, 38

stringof, 163

struct, 15, 17, 80, 240-247, 252-256, 258-263, 266, 267, 269

construction sequence, 245

constructor, 244

field layout, 267

forwarding constructor, 245

initialization, 17

methods, 255

vs. class, 26

subclass, 191

substitutability, 329

subtraction, 55

subtype, 191, 192

proper, 191

sum, 158

super, 194-195

super, 31

superclass, 191

supertype, 191

surgery on code, 20, 211

surprising behavior

of unary -, 53

surrogate pair, 124

Susie, 147

Sutter, Herb, 213, 398

swap, 178

swap, 178

switch, 65, 71, 78, 79

symbol, 30, 339-348

generated by compiler, 74

lookup

at module scope, 30

table, 2

visibility, 69, 80

symbol lookup, 337

symmetry, 206

synchronization, 415

for an infinite number of threads, 426

object, 414

primitive, 395, 426

wait-free, 426

synchronized class

field typing, 419

rules, 419

synchronized, 88, 418, 419, 424, 425, 431

protection against races

local aspect, 419, 420

temporary aspect, 419

semantics, 419

tail sharing, 420

with multiple arguments, 425

syntactic sugar, 366

syntactically valid type, 48

system-fu, 2

system-level access, 96

system-level language, 89

system-level programmer, 96

T

table lookup, 83

tag-based switching, 72

tagged union, 272

tail call elimination, 12, 167

task switching, 394

tear-down, 187

Teigen, Knut Erik, xxvii

telephony application, 395

template, 279, 281, 282

tension between efficiency and static verifiability, 186

tensor, 366

termination of multithreaded application, 407

terminology, 191

ternary operator, 74

test-and-set, 426

test-driven, 133

testing, 133

text processing, 8

text, 317

textual inclusion, 84

theorem of structure, 6

this(), 240

this(this), 240, 245, 247, 249-251, 253, 273

rationale, 249

this, 31, 182, 196

thisTid, 402

Thompson, Ken, 119

thread, 137, 394, 395, 397

starting, 399

thread blocking, 425

thread id, see tid 438

thread isolation, 391, 397, 400

thread priority, 415

thread queue, 410

thread scheduler, 396

thread startup, 188

thread termination, 407

thread-local storage, 107, 398

threading amenities, 431

threading API, 407

throw, 81, 301, 302, 309

Throwable, 302, 307, 308

thumb drive, 406

tid, 401

Tid, 401, 402

tightest common type, 59

time invariance, 395

time quantum, 394

time sharing, 394, 396

time slicing, 397

time-sliced threads, 414

timer interrupt, 394

TLS, see thread-local storage 438

to, 16, 17, 83, 102, 161

toHash, 205

tolower, 17

top braces, 74

top level declaration, 339

top-level statements, 1

toString, 205

trailing else, 68

transactional creation of a file, 88

transactional semantics, 168

transcendental function, 366

transcoding, 124

transitive, 144

for shared, 412

transitivity, 136, 206, 209, 210, 290

of equality with zero, 209

of sign, 209

transitivity rule, 427

transitory state, 152, 166, 167

translation, 139

tree, 180, 382

tree container, 261

tree iteration, 382

trie, 131

true, 32

truncation, 54

trusted module, 96

try, 65, 81, 82, 84, 303, 366

tuple, 163

Tuple, 163, 402

tuple, 163

two’s complement, 53

type

conciliation, 74

enumerated, 72

for operators, 45

of literal string, 37

self-referential, see self-referential types 438

type constructor, 26

type deduction, 11, 14, 138, 140, 149

type erasure, 235

type inference, 4, 29, 39

type name syntax, 365

type parameter, 138, 140

type parameter, 10

type parameterization, 139

type parameters, 234

type qualifier, 38, 287

composition rules, 299

propagating to result, 299

syntax, 291

type system, 397, 424

type system integrity, 54

typeid, 32, 37

typeof, 37, 141, 163, 276

U

ubyte, 4, 29, 407

UCS-2, 120

uint, 4, 29

ulong, 4, 29

unary

minus, 53

plus, 53

unary operator, 367

unary operator type, 45

unbound, 179

unbounded amount of code, 202

unbridled confidence, 427

unchecked cast, 54

underscore, 30

in numeric literals, 32

undue aliasing, 180

unfortunately, 392

Unicode, 34, 118-122, 338

code point, 118, 119

code unit, 119

Consortium, 118

encoding, 118, 121

misconception about, 118

specific spelling, 118

variable-length encoding, 119

uniform, 94

uniformity, 139

uninitialized data, 107, 185

union, 240, 270-272

uniprocessor, 414

unit of compilation, 337

unittest, 11, 133, 138, 256, 361

universal characters, 30

universality results, 426, 427

Unix, 2, 340

unlocking, 417

unordered functions, 144

unprotected sharing, 398, 416

unqualified access to shared data, 416

unsafe constructs, 107, 110

unsigned, 74

unsigned shift, 55

unsigned type, 53

unspecified value, 55

unstated assumption, 397

untrusted format strings, 5

untyped address, 152

untyped memory, 184

unwashed masses, 167

unwieldy code, 86

user input, 325, 329

ushort, 4, 29

UTF, 118, 121, 122, 124, 328, 333

UTF-8, 30, 36, 37, 118-121, 123, 338

backward iteration, 120

properties, 119

synchronization, 120

UTF-16, 30, 36, 118, 120, 123, 124, 338

criticism against, 120

high surrogate area, 120

low surrogate area, 120

UTF-32, 30, 36, 118, 120, 123, 338

UtfException, 328

V

value declaration, 74

value object, 177

value range propagation, 29, 43, 45

value semantics, 26, 178, 181, 242, 246

value type, 240

value versus reference, 15, 25

varargs, 315

variable-length encoding, 120

variadic function, 159

heterogeneous, 160

homogeneous, 159

variadic functions, 5

Variant, 386, 405

vector, 366

vector operation parallelization, 394

verboten, 400

VERIFY, 325

version control, 202

version, 360

virtual function dispatch, 72

virtual table, 229

Vlimagesceanu, Cristian, xxvii

vocabulary, 8, 143

vocabulary building program, see example 438

void, 29, 107

as initializer, 185, 245

Voltaire, 343

Voltemand, 20

W

w (string literal suffix), 39, 123

Wadler, Philip, 313

wait-free synchronization, 426

walkLength, 333

wchar, 29, 39, 120, 121

Wegner, Peter, 83

werewolf, 5

while, 73, 78

whitespace, 6, 8

Windows, 2, 89, 340, 356

with, 80

writefln, 4

writeln, 2, 4, 68, 81, 159

atomicity of, 399

wstring, 39, 121

WYSIWYG string literal, 35, 36

X

x86, 89

Y

Y2K, 202

yacc, 47

you’ve been warned, 97

Z

zero-based, 50

Zolman, Leor, xxvii

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.139.168