0% found this document useful (0 votes)
104 views47 pages

Concepts in Programming Languages 1st Edition John C. Mitchell Download

The document provides information about the book 'Concepts in Programming Languages' by John C. Mitchell, which covers essential programming language concepts such as functions, types, memory management, and control. It is aimed at undergraduate and beginning graduate students and includes comparisons of major object-oriented languages like C++ and Java. The text also discusses foundational topics and advanced concepts like concurrency and logic programming, helping readers understand the trade-offs in programming language design.

Uploaded by

kczbsxpya828
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views47 pages

Concepts in Programming Languages 1st Edition John C. Mitchell Download

The document provides information about the book 'Concepts in Programming Languages' by John C. Mitchell, which covers essential programming language concepts such as functions, types, memory management, and control. It is aimed at undergraduate and beginning graduate students and includes comparisons of major object-oriented languages like C++ and Java. The text also discusses foundational topics and advanced concepts like concurrency and logic programming, helping readers understand the trade-offs in programming language design.

Uploaded by

kczbsxpya828
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

Concepts in programming languages 1st Edition John

C. Mitchell download pdf

https://ebookultra.com/download/concepts-in-programming-languages-1st-
edition-john-c-mitchell/

Visit ebookultra.com today to download the complete set of


ebook or textbook!
We believe these products will be a great fit for you. Click
the link to download now, or visit ebookultra.com
to discover even more!

Theories of Programming Languages 1st Edition John C.


Reynolds

https://ebookultra.com/download/theories-of-programming-languages-1st-
edition-john-c-reynolds/

Programming Concepts in C 2nd Edition Robert Burns

https://ebookultra.com/download/programming-concepts-in-c-2nd-edition-
robert-burns/

Programming with Visual C Concepts and Projects 1st


Edition James Allert

https://ebookultra.com/download/programming-with-visual-c-concepts-
and-projects-1st-edition-james-allert/

Beginning C Game Programming 2nd ed. Edition John Horton

https://ebookultra.com/download/beginning-c-game-programming-2nd-ed-
edition-john-horton/
Masterminds of Programming Conversations with the Creators
of Major Programming Languages 1st Edition Federico
Biancuzzi
https://ebookultra.com/download/masterminds-of-programming-
conversations-with-the-creators-of-major-programming-languages-1st-
edition-federico-biancuzzi/

Essentials of Programming Languages Third Edition Daniel


P. Friedman

https://ebookultra.com/download/essentials-of-programming-languages-
third-edition-daniel-p-friedman/

Concepts in Toxicology 1st Edition John H. Duffus

https://ebookultra.com/download/concepts-in-toxicology-1st-edition-
john-h-duffus/

Programming Languages Principles and Paradigms 2nd Edition


Allen B. Tucker

https://ebookultra.com/download/programming-languages-principles-and-
paradigms-2nd-edition-allen-b-tucker/

C Programming in Linux 1st edition Edition Haskins D.

https://ebookultra.com/download/c-programming-in-linux-1st-edition-
edition-haskins-d/
Concepts in programming languages 1st Edition John C.
Mitchell Digital Instant Download
Author(s): John C. Mitchell, Krzysztof Apt
ISBN(s): 9780521780988, 0521780985
Edition: 1st
File Details: PDF, 7.59 MB
Year: 2001
Language: english
Team-Fly

. .Concepts in Programming Languages


by John C. Mitchell ISBN:0521780985

Cambridge University Press © 2003 (529 pages)

This book provides a better understanding of the issues and trade-offs that arise in
programming language design and a better appreciation of the advantages and pitfalls of the
programming languages used.

Table of Contents

Concepts in Programming Languages


Preface
Part 1 - Function and Foundations

Chapter 1 - Introduction
Chapter 2 - Computability
Chapter 3 - Lisp—Functions, Recursion, and Lists
Chapter 4 - Fundamentals
Part 2 - Procedures, Types, Memory Mangement, and Control

Chapter 5 - The Algol Family and ML


Chapter 6 - Type Systems and Type Inference
Chapter 7 - Scope, Functions, and Storage Management
Chapter 8 - Control in Sequential Languages
Part 3 - Modularity, Abstraction, and Object-Oriented Programming

Chapter 9 - Data Abstraction and Modularity


Chapter 10 - Concepts in Object-Oriented Languages
Chapter 11 - History of Objects—Simula and Smalltalk
Chapter 12 - Objects and Run-Time Efficiency— C++
Chapter 13 - Portability and Safety—Java
Part 4 - Concurrency and Logic Programming

Chapter 14 - Concurrent and Distributed Programming


Chapter 15 - The Logic Programming Paradigm and Prolog
Appendix A - Additional Program Examples
Glossary
Index
List of Figures
List of Tables

Team-Fly
Team-Fly

Back Cover
This textbook for undergraduate and beginning graduate students explains and examines the central concepts used in
modern programming languages, such as functions, types, memory management, and control. This book is unique in its
comprehensive presentation and comparison of major object-oriented programming languages. Separate chapters examine
the history of objects, Simula and Smalltalk, and the prominent languages C++ and Java.

The author presents foundational topics, such as lambda calculus and denotational semantics, in an easy-to-read, informal
style, focusing on the main insights provided by these theories. Advanced topics include concurrency and concurrent
object-oriented programming. A chapter on logic programming illustrates the importance of specialized programming
methods for certain kinds of problems.

This book will give the reader a better understanding of the issues and trade-offs that arise in programming language design
and a better appreciation of the advantages and pitfalls of the programming languages they use.

About the Author

John C. Mitchell is Professor of Computer Science at Stanford University, where he has been a popular teacher for more
than a decade. Many of his former students are successful in research and private industry. He received his Ph.D. from MIT
in 1984 and was a Member of Technical Staff at AT&T Bell Laboratories before joining the faculty at Stanford. Over the past
twenty years, Mitchell has been a featured speaker at international conferences, has led research projects on a variety of
topics, including programming language design and analysis, computer security, and applications of mathematical logic to
computer science, and has written more than 100 research articles. His graduate textbook, Foundation for Programming
Languages covers lambda calculus, type systems, logic for program verification, and mathematical semantics of
programming languages. Professor Mitchell was a member of the standardization effort and the 2002 Program Chair of the
ACM Principles of Programming Languages conference.

Team-Fly
Team-Fly

Concepts in Programming Languages


John C. Mitchell

Stanford University

CAMBRIDGE UNIVERSITY PRESS

Published by the Press Syndicate of the University of Cambridge


The Pitt Building, Trumpington Street, Cambridge, United Kingdom

Cambridge University Press


The Edinburgh Building, Cambridge CB2 2RU, UK
40 West 20th Street, New York, NY 10011-4211, USA
477 Williamstown Road, Port Melbourne, VIC 3207, Australia
Ruiz de Alarcón 13, 28014 Madrid, Spain
Dock House, The Waterfront, Cape Town 8001, South Africa

http://www.cambridge.org

Copyright © 2002 Cambridge University Press

This book is in copyright. Subject to statutory exception and to the provisions of relevant collective licensing
agreements, no reproduction of any part may take place without the written permission of Cambridge University Press.

First published 2002

A
Typefaces Times Ten 10/12.5 pt., ITC Franklin Gothic, and Officina Serif System L TEX2ε [TB]

A catalog record for this book is available from the British Library.

Library of Congress Cataloging in Publication data available.


0-521-78098-5

Concepts in Programming Languages

This textbook for undergraduate and beginning graduate students explains and examines the central concepts used in
modern programming languages, such as functions, types, memory management, and control. The book is unique in
its comprehensive presentation and comparison of major object-oriented programming languages. Separate chapters
examine the history of objects, Simula and Smalltalk, and the prominent languages C++ and Java.

The author presents foundational topics, such as lambda calculus and denotational semantics, in an easy-to-read,
informal style, focusing on the main insights provided by these theories. Advanced topics include concurrency and
concurrent object-oriented programming. A chapter on logic programming illustrates the importance of specialized
programming methods for certain kinds of problems.

This book will give the reader a better understanding of the issues and trade-offs that arise in programming language
design and a better appreciation of the advantages and pitfalls of the programming languages they use.

John C. Mitchell is Professor of Computer Science at Stanford University, where he has been a popular teacher for
more than a decade. Many of his former students are successful in research and private industry. He received his
Ph.D. from MIT in 1984 and was a Member of Technical Staff at AT&T Bell Laboratories before joining the faculty at
Stanford. Over the past twenty years, Mitchell has been a featured speaker at international conferences; has led
research projects on a variety of topics, including programming language design and analysis, computer security, and
applications of mathematical logic to computer science; and has written more than 100 research articles. His previous
textbook, Foundations for Programming Languages (MIT Press, 1996), covers lambda calculus, type systems, logic for
program verification, and mathematical semantics of programming languages. Professor Mitchell was a member of the
programming language subcommittee of the ACM/IEEE Curriculum 2001 standardization effort and the 2002 Program
Chair of the ACM Principles of Programming Languages conference.

Team-Fly
Team-Fly

Preface
A good programming language is a conceptual universe for thinking about programming.

Alan Perlis, NATO Conference on Software Engineering Techniques, Rome, 1969

Programming languages provide the abstractions, organizing principles, and control structures that programmers use
to write good programs. This book is about the concepts that appear in programming languages, issues that arise in
their implementation, and the way that language design affects program development. The text is divided into four
parts:

Part 1: Functions and Foundations

Part 2: Procedures, Types, Memory Management, and Control

Part 3: Modularity, Abstraction, and Object-Oriented Programming

Part 4: Concurrency and Logic Programming

Part 1 contains a short study of Lisp as a worked example of programming language analysis and covers compiler
structure, parsing, lambda calculus, and denotational semantics. A short Computability chapter provides information
about the limits of compile-time program analysis and optimization.

Part 2 uses procedural Algol family languages and ML to study types, memory management, and control structures.

In Part 3 we look at program organization using abstract data types, modules, and objects. Because object-oriented
programming is the most prominent paradigm in current practice, several different object-oriented languages are
compared. Separate chapters explore and compare Simula, Smalltalk, C++, and Java.

Part 4 contains chapters on language mechanisms for concurrency and on logic programming.

The book is intended for upper-level undergraduate students and beginning graduate students with some knowledge
of basic programming. Students are expected to have some knowledge of C or some other procedural language and
some acquaintance with C++ or some form of object-oriented language. Some experience with Lisp, Scheme, or ML
is helpful in Parts 1 and 2, although many students have successfully completed the course based on this book without
this background. It is also helpful if students have some experience with simple analysis of algorithms and data
structures. For example, in comparing implementations of certain constructs, it will be useful to distinguish between
algorithms of constant-, polynomial-, and exponential-time complexity.

After reading this book, students will have a better understanding of the range of programming languages that have
been used over the past 40 years, a better understanding of the issues and trade-offs that arise in programming
language design, and a better appreciation of the advantages and pitfalls of the programming languages they use.
Because different languages present different programming concepts, students will be able to improve their
programming by importing ideas from other languages into the programs they write.

Acknowledgments

This book developed as a set of notes for Stanford CS 242, a course in programming languages that I have taught
since 1993. Each year, energetic teaching assistants have helped debug example programs for lectures, formulate
homework problems, and prepare model solutions. The organization and content of the course have been improved
greatly by their suggestions. Special thanks go to Kathleen Fisher, who was a teaching assistant in 1993 and 1994
and taught the course in my absence in 1995. Kathleen helped me organize the material in the early years and, in
1995, transcribed my handwritten notes into online form. Thanks to Amit Patel for his initiative in organizing homework
assignments and solutions and to Vitaly Shmatikov for persevering with the glossary of programming language terms.
Anne Bracy, Dan Bentley, and Stephen Freund thoughtfully proofread many chapters.
Lauren Cowles, Alan Harvey, and David Tranah of Cambridge University Press were encouraging and helpful. I
particularly appreciate Lauren's careful reading and detailed comments of twelve full chapters in draft form. Thanks
also are due to the reviewers they enlisted, who made a number of helpful suggestions on early versions of the book.
Zena Ariola taught from book drafts at the University of Oregon several years in a row and sent many helpful
suggestions; other test instructors also provided helpful feedback.

Finally, special thanks to Krzystof Apt for contributing a chapter on logic programming.

John Mitchell

Team-Fly
Team-Fly

Part 1: Function and Foundations


Chapter 1: Introduction

Chapter 2: Computability

Chapter 3: Lisp- Functions, Recursion, and Lists

Chapter 4: Fundamentals

Team-Fly
Team-Fly

Chapter 1: Introduction
"The Medium Is the Message"
--Marshall McLuhan

1.1 PROGRAMMING LANGUAGES


Programming languages are the medium of expression in the art of computer programming. An ideal programming
language will make it easy for programmers to write programs succinctly and clearly. Because programs are meant to
be understood, modified, and maintained over their lifetime, a good programming language will help others read
programs and understand how they work. Software design and construction are complex tasks. Many software
systems consist of interacting parts. These parts, or software components, may interact in complicated ways. To
manage complexity, the interfaces and communication between components must be designed carefully. A good
language for large-scale programming will help programmers manage the interaction among software components
effectively. In evaluating programming languages, we must consider the tasks of designing, implementing, testing, and
maintaining software, asking how well each language supports each part of the software life cycle.

There are many difficult trade-offs in programming language design. Some language features make it easy for us to
write programs quickly, but may make it harder for us to design testing tools or methods. Some language constructs
make it easier for a compiler to optimize programs, but may make programming cumbersome. Because different
computing environments and applications require different program characteristics, different programming language
designers have chosen different trade-offs. In fact, virtually all successful programming languages were originally
designed for one specific use. This is not to say that each language is good for only one purpose. However, focusing
on a single application helps language designers make consistent, purposeful decisions. A single application also
helps with one of the most difficult parts of language design: leaving good ideas out.
I hope you enjoy using this book. At the beginning of each chapter, I have included pictures of people involved
in the development or analysis of programming languages. Some of these people are famous, with major
awards and published biographies. Others are less widely recognized. When possible, I have tried to include
some personal information based on my encounters with these people. This is to emphasize that programming
languages are developed by real human beings. Like most human artifacts, a programming language inevitably
reflects some of the personality of its designers.

As a disclaimer, let me point out that I have not made an attempt to be comprehensive in my brief biographical
comments. I have tried to liven up the text with a bit of humor when possible, leaving serious biography to more
serious biographers. There simply is not space to mention all of the people who have played important roles in
the history of programming languages.

Historical and biographical texts on computer science and computer scientists have become increasingly
available in recent years. If you like reading about computer pioneers, you might enjoy paging through Out of
Their Minds: The Lives and Discoveries of 15 Great Computer Scientists by Dennis Shasha and Cathy Lazere
or other books on the history of computer science.

John Mitchell

Even if you do not use many of the programming languages in this book, you may still be able to put the conceptual
framework presented in these languages to good use. When I was a student in the mid-1970s, all "serious"
programmers (at my university, anyway) used Fortran. Fortran did not allow recursion, and recursion was generally
regarded as too inefficient to be practical for "real programming." However, the instructor of one course I took argued
that recursion was still an important idea and explained how recursive techniques could be used in Fortran by
managing data in an array. I am glad I took that course and not one that dismissed recursion as an impractical idea. In
the 1980s, many people considered object-oriented programming too inefficient and clumsy for real programming.
However, students who learned about object-oriented programming in the 1980s were certainly happy to know about
these "futuristic" languages in the 1990s, as object-oriented programming became more widely accepted and used.

Although this is not a book about the history of programming languages, there is some attention to history throughout
the book. One reason for discussing historical languages is that this gives us a realistic way to understand
programming language trade-offs. For example, programs were different when machines were slow and memory was
scarce. The concerns of programming language designers were therefore different in the 1960s from the current
concerns. By imaging the state of the art in some bygone era, we can give more serious thought to why language
designers made certain decisions. This way of thinking about languages and computing may help us in the future,
when computing conditions may change to resemble some past situation. For example, the recent rise in popularity of
handheld computing devices and embedded processors has led to renewed interest in programming for devices with
limited memory and limited computing power.

When we discuss specific languages in this book, we generally refer to the original or historically important form of a
language. For example, "Fortran" means the Fortran of the 1960s and early 1970s. These early languages were called
Fortran I, Fortran II, Fortran III, and so on. In recent years, Fortran has evolved to include more modern features, and
the distinction between Fortran and other languages has blurred to some extent. Similarly, Lisp generally refers to the
Lisps of the 1960s, Smalltalk to the language of the late 1970s and 1980s, and so on.

Team-Fly
Team-Fly

1.2 GOALS
In this book we are concerned with the basic concepts that appear in modern programming languages, their
interaction, and the relationship between programming languages and methods for program development. A recurring
theme is the trade-off between language expressiveness and simplicity of implementation. For each programming
language feature we consider, we examine the ways that it can be used in programming and the kinds of
implementation techniques that may be used to compile and execute it efficiently.

1.2.1 General Goals

In this book we have the following general goals:

To understand the design space of programming languages. This includes concepts and constructs
from past programming languages as well as those that may be used more widely in the future. We
also try to understand some of the major conflicts and trade-offs between language features, including
implementation costs.

To develop a better understanding of the languages we currently use by comparing them with other
languages.

To understand the programming techniques associated with various language features. The study of
programming languages is, in part, the study of conceptual frameworks for problem solving, software
construction, and development.

Many of the ideas in this book are common knowledge among professional programmers. The material and ways of
thinking presented in this book should be useful to you in future programming and in talking to experienced
programmers if you work for a software company or have an interview for a job. By the end of the course, you will be
able to evaluate language features, their costs, and how they fit together.

1.2.2 Specific Themes

Here are some specific themes that are addressed repeatedly in the text:

Computability: Some problems cannot be solved by computer. The undecidability of the halting
problem implies that programming language compilers and interpreters cannot do everything that we
might wish they could do.

Static analysis: There is a difference between compile time and run time. At compile time, the
program is known but the input is not. At run time, the program and the input are both available to the
run-time system. Although a program designer or implementer would like to find errors at compile
time, many will not surface until run time. Methods that detect program errors at compile time are
usually conservative, which means that when they say a program does not have a certain kind of
error this statement is correct. However, compile-time error-detection methods will usually say that
some programs contain errors even if errors may not actually occur when the program is run.

Expressiveness versus efficiency: There are many situations in which it would be convenient to have
a programming language implementation do something automatically. An example discussed in
Chapter 3 is memory management: The Lisp run-time system uses garbage collection to detect
memory locations no longer needed by the program. When something is done automatically, there is
a cost. Although an automatic method may save the programmer from thinking about something, the
implementation of the language may run more slowly. In some cases, the automatic method may
make it easier to write programs and make programming less prone to error. In other cases, the
resulting slowdown in program execution may make the automatic method infeasible.

Team-Fly
Team-Fly

1.3 PROGRAMMING LANGUAGE HISTORY


Hundreds of programming languages have been designed and implemented over the last 50 years. As many as 50 of
these programming languages contained new concepts, useful refinements, or innovations worthy of mention.
Because there are far too many programming languages to survey, however, we concentrate on six programming
languages: Lisp, ML, C, C++, Smalltalk, and Java. Together, these languages contain most of the important language
features that have been invented since higher-level programming languages emerged from the primordial swamp of
assembly language programming around 1960.

The history of modern programming languages begins around 1958-1960 with the development of Algol, Cobol,
Fortran, and Lisp. The main body of this book covers Lisp, with a shorter discussion of Algol and subsequent related
languages. A brief account of some earlier languages is given here for those who may be curious about programming
language prehistory.

In the 1950s, a number of languages were developed to simplify the process of writing sequences of computer
instructions. In this decade, computers were very primitive by modern standards. Most programming was done with
the native machine language of the underlying hardware. This was acceptable because programs were small and
efficiency was extremely important. The two most important programming language developments of the 1950s were
Fortan and Cobol.

Fortran was developed at IBM around 1954-1956 by a team led by John Backus. The main innovation of Fortran (a
contraction of formula translator) was that it became possible to use ordinary mathematical notation in expressions.
For example, the Fortran expression for adding the value of i to twice the value of j is i + 2*j. Before the development
of Fortran, it might have been necessary to place i in a register, place j in a register, multiply j times 2 and then add the
result to i. Fortran allowed programmers to think more naturally about numerical calculation by using symbolic names
for variables and leaving some details of evaluation order to the compiler. Fortran also had subroutines (a form of
procedure or function), arrays, formatted input and output, and declarations that gave programmers explicit control
over the placement of variables and arrays in memory. However, that was about it. To give you some idea of the
limitations of Fortran, many early Fortran compilers stored numbers 1, 2, 3 … in memory locations, and programmers
could change the values of numbers if they were not careful! In addition, it was not possible for a Fortran subroutine to
call itself, as this required memory management techniques that had not been invented yet (see Chapter 7).

Cobol is a programming language designed for business applications. Like Fortran programs, many Cobol programs
are still in use today, although current versions of Fortran and Cobol differ substantially from forms of these languages
of the 1950s. The primary designer of Cobol was Grace Murray Hopper, an important computer pioneer. The syntax of
Cobol was intended to resemble that of common English. It has been suggested in jest that if object-oriented Cobol
were a standard today, we would use "add 1 to Cobol giving Cobol" instead of "C++".

The earliest languages covered in any detail in this book are Lisp and Algol, which both came out around 1960. These
languages have stack memory management and recursive functions or procedures. Lisp provides higher-order
functions (still not available in many current languages) and garbage collection, whereas the Algol family of languages
provides better type systems and data structuring. The main innovations of the 1970s were methods for organizing
data, such as records (or structs), abstract data types, and early forms of objects. Objects became mainstream in the
1980s, and the 1990s brought increasing interest in network-centric computing, interoperability, and security and
st
correctness issues associated with active content on the Internet. The 21 century promises greater diversity of
computing devices, cheaper and more powerful hardware, and increasing interest in correctness, security, and
interoperability.

Team-Fly
Team-Fly

1.4 ORGANIZATION: CONCEPTS AND LANGUAGES


There are many important language concepts and many programming languages. The most natural way to
summarize the field is to use a two-dimensional matrix, with languages along one axis and concepts along the other.
Here is a partial sketch of such a matrix:

Language Expressions Functions Heap Exceptions Modules Objects Threads


storage

Lisp x x x

C x x x

Algol 60 x x

Algol 68 x x x x

Pascal x x x

Modula-2 x x x x

Modula-3 x x x x x x

ML x x x x x

Simula x x x x x

Smalltalk x x x x x x

C++ x x x x x x

Objective C x x x x

Java x x x x x x x

Although this matrix lists only a fraction of the languages and concepts that might be covered in a basic text or course
on the programming languages, one general characteristic should be clear. There are some basic language concepts,
such as expressions, functions, local variables, and stack storage allocation that are present in many languages. For
these concepts, it makes more sense to discuss the concept in general than to go through a long list of similar
languages. On the other hand, for concepts such as objects and threads, there are relatively few languages that
exhibit these concepts in interesting ways. Therefore, we can study most of the interesting aspects of objects by
comparing a few languages. Another factor that is not clear from the matrix is that, for some concepts, there is
considerable variation from language to language. For example, it is more interesting to compare the way objects have
been integrated into languages than it is to compare integer expressions. This is another reason why competing
object-oriented languages are compared, but basic concepts related to expressions, statements, functions, and so on,
are covered only once, in a concept-oriented way.

Most courses and texts on programming languages use some combination of language-based and concept-based
presentation. In this book a concept-oriented organization is followed for most concepts, with a language-based
organization used to compare object-oriented features.

The text is divided into four parts:

Part 1: Functions and Foundations (Chapters 1-4)

Part 2: Procedures, Types, Memory Management, and Control (5-8)


Part 3: Modularity, Abstraction and Object-Oriented Programming (9-13)

Part 4: Concurrency and Logic Programming (14 and 15)

In Part 1 a short study of Lisp is presented, followed by a discussion of compiler structure, parsing, lambda calculus,
and denotational semantics. A short chapter provides a brief discussion of computability and the limits of compile-time
program analysis and optimization. For C programmers, the discussion of Lisp should provide a good chance to think
differently about programming and programming languages.

In Part 2, we progress through the main concepts associated with the conventional languages that are descended in
some way from the Algol family. These concepts include type systems and type checking, functions and stack storage
allocation, and control mechanisms such as exceptions and continuations. After some of the history of the Algol family
of languages is summarized, the ML programming language is used as the main example, with some discussion and
comparisons using C syntax.

Part 3 is an investigation of program-structuring mechanisms. The important language advances of the 1970s were
abstract data types and program modules. In the late 1980s, object-oriented concepts attained widespread
acceptance. Because object-oriented programming is currently the most prominent programming paradigm, in most of
Part 3 we focus on object-oriented concepts and languages, comparing Smalltalk, C++, and Java.

Part 4 contains chapters on language mechanisms for concurrent and distributed programs and on logic programming.

Because of space limitations, a number of interesting topics are not covered. Although scripting languages and other
"special-purpose" languages are not covered explicitly in detail, an attempt has been made to integrate some relevant
language concepts into the exercises.

Team-Fly
Team-Fly

Chapter 2: Computability
Some mathematical functions are computable and some are not. In all general-purpose programming languages, it is
possible to write a program for each function that is computable in principle. However, the limits of computability also
limit the kinds of things that programming language implementations can do. This chapter contains a brief overview of
computability so that we can discuss limitations that involve computability in other chapters of the book.

2.1 PARTIAL FUNCTIONS AND COMPUTABILITY


From a mathematical point of view, a program defines a function. The output of a program is computed as a function
of the program inputs and the state of the machine before the program starts. In practice, there is a lot more to a
program than the function it computes. However, as a starting point in the study of programming languages, it is useful
to understand some basic facts about computable functions.

The fact that not all functions are computable has important ramifications for programming language tools and
implementations. Some kinds of programming constructs, however useful they might be, cannot be added to real
programming languages because they cannot be implemented on real computers.

2.1.1 Expressions, Errors, and Nontermination

In mathematics, an expression may have a defined value or it may not. For example, the expression 3 + 2 has a
defined value, but the expression 3/0 does not. The reason that 3/0 does not have a value is that division by zero is
not defined: division is defined to be the inverse of multiplication, but multiplication by zero cannot be inverted. There is
nothing to try to do when we see the expression 3/0; a mathematician would just say that this operation is undefined,
and that would be the end of the discussion.

In computation, there are two different reasons why an expression might not have a value:
Alan Turing was a British mathematician. He is known for his early work on computability and his work for British
Intelligence on code breaking during the Second World War. Among computer scientists, he is best known for
the invention of the Turing machine. This is not a piece of hardware, but an idealized computing device. A Turing
machine consists of an infinite tape, a tape read-write head, and a finite-state controller. In each computation
step, the machine reads a tape symbol and the finite-state controller decides whether to write a different symbol
on the current tape square and then whether to move the read-write head one square left or right. The
importance of this idealized computer is that it is both very simple and very powerful.

Turing was a broad-minded individual with interests ranging from relativity theory and mathematical logic to
number theory and the engineering design of mechanical computers. There are numerous published
biographies of Alan Turing, some emphasizing his wartime work and others calling attention to his sexuality and
its impact on his professional career.

The ACM Turing Award is the highest scientific honor in computer science, equivalent to a Nobel Prize in other
fields.

Error termination: Evaluation of the expression cannot proceed because of a conflict between
operator and operand.

Nontermination: Evaluation of the expression proceeds indefinitely.

An example of the first kind is division by zero. There is nothing to compute in this case, except possibly to stop the
computation in a way that indicates that it could not proceed any further. This may halt execution of the entire
program, abort one thread of a concurrent program, or raise an exception if the programming language provides
exceptions.

The second case is different: There is a specific computation to perform, but the computation may not terminate and
therefore may not yield a value. For example, consider the recursive function defined by

f(x:int) = if x = 0 then 0 else x + f(x-2)

This is a perfectly meaningful definition of a partial function, a function that has a value on some arguments but not on
all arguments. The expression f(4) calling the function f above has value 4 + 2 + 0 = 6, but the expression f(5) does not
have a value because the computation specified by this expression does not terminate.

2.1.2 Partial Functions


A partial function is a function that is defined on some arguments and undefined on others. This is ordinarily what is
meant by function in programming, as a function declared in a program may return a result or may not if some loop or
sequence of recursive calls does not terminate. However, this is not what a mathematician ordinarily means by the
word function.

The distinction can be made clearer by a look at the mathematical definitions. A reasonable definition of the word
function is this: A function f : A → B from set A to set B is a rule associating a unique value y = f (x)in B with every x in
A. This is almost a mathematical definition, except that the word rule does not have a precise mathematical meaning.
The notation f : A → B means that, given arguments in the set A, the function f produces values from set B. The set A
is called the domain of f, and the set B is called the range or the codomain of f.

The usual mathematical definition of function replaces the idea of rule with a set of argument-result pairs called the
graph of a function. This is the mathematical definition:

A function f : A → B is a set of ordered pairs f ⊆ A × B that satisfies the following conditions:

1. If ?x, y? ? f and ?x, z?? f, then y = z.

2. For every x ? A, there exists y ? B with ?x, y?? f.

When we associate a set of ordered pairs with a function, the ordered pair ?x, y? is used to indicate that y is the value
of the function on argument x. In words, the preceding two conditions can be stated as (1) a function has at most one
value for every argument in its domain, and (2) a function has at least one value for every argument in its domain.

A partial function is similar, except that a partial function may not have a value for every argument in its domain. This is
the mathematical definition:

A partial function f : A → B is a set of ordered pairs f ⊆ A × B satisfying the preceding condition

1. If ?x, y?? f and ?x, z?? f, then y = z.

In words, a partial function is single valued, but need not be defined on all elements of its domain.

Programs Define Partial Functions

In most programming languages, it is possible to define functions recursively. For example, here is a function f defined
in terms of itself:

f(x:int) = ifx=0 then 0 else x + f(x-2);

If this were written as a program in some programming language, the declaration would associate the function name f
with an algorithm that terminates on every evenx≥0, but diverges (does not halt and return a value) if x is odd or
negative. The algorithm for f defines the following mathematical function f, expressed here as a set of ordered pairs:

f ={?x, y?| x is positive and even, y = 0 + 2 + 4 +...+ x}.

This is a partial function on the integers. For every integer x, there is at most one y with f (x) = y. However, if x is an odd
number, then there is no y with f (x) = y. Where the algorithm does not terminate, the value of the function is undefined.
Because a function call may not terminate, this program defines a partial function.

2.1.3 Computability

Computability theory gives us a precise characterization of the functions that are computable in principle. The class of
functions on the natural numbers that are computable in principle is often called the class of partial recursive functions,
as recursion is an essential part of computation and computable functions are, in general, partial rather than total. The
reason why we say "computable in principle" instead of "computable in practice" is that some computable functions
might take an extremely long time to compute. If a function call will not return for an amount of time equal to the length
of the entire history of the universe, then in practice we will not be able to wait for the computation to finish.
Nonetheless, computability in principle is an important benchmark for programming languages.

Computable Functions

Intuitively, a function is computable if there is some program that computes it. More specifically, a function f : A → B is
computable if there is an algorithm that, given any x ? A as input, halts with y = f (x) as output.

One problem with this intuitive definition of computable is that a program has to be written out in some programming
language, and we need to have some implementation to execute the program. It might very well be that, in one
programming language, there is a program to compute some mathematical function and in another language there is
not.

In the 1930s, Alonzo Church of Princeton University proposed an important principle, called Church's thesis. Church's
thesis, which is a widely held belief about the relation between mathematical definitions and the real world of
computing, states that the same class of functions on the integers can be computed by any general computing
device. This is the class of partial recursive functions, sometimes called the class of computable functions. There is a
mathematical definition of this class of functions that does not refer to programming languages, a second definition
that uses a kind of idealized computing device called a Turing machine, and a third (equivalent) definition that uses
lambda calculus (see Section 4.2). As mentioned in the biographical sketch on Alan Turing, a Turing machine consists
of an infinite tape, a tape read-write head, and a finite-state controller. The tape is divided into contiguous cells, each
containing a single symbol. In each computation step, the machine reads a tape symbol and the finite-state controller
decides whether to write a different symbol on the current tape square and then whether to move the read-write head
one square left or right. Part of the evidence that Church cited in formulating this thesis was the proof that Turing
machines and lambda calculus are equivalent. The fact that all standard programming languages express precisely
the class of partial recursive functions is often summarized by the statement that all programming languages are
Turing complete. Although it is comforting to know that all programming languages are universal in a mathematical
sense, the fact that all programming languages are Turing complete also means that computability theory does not
help us distinguish among the expressive powers of different programming languages.

Noncomputable Functions

It is useful to know that some specific functions are not computable. An important example is commonly referred to as
the halting problem. To simplify the discussion and focus on the central ideas, the halting problem is stated for
programs that require one string input. If P is such a program and x is a string input, then we write P(x)for the output of
program P on input x.
Halting Problem: Given a program P that requires exactly one string input and a string x, determine
whether P halts on input x.

We can associate the halting problem with a function fhalt by letting fhalt (P, x) = "halts" if P halts on input and fhalt(P,
x) = "does not halt" otherwise. This function fhalt can be considered a function on strings if we write each program out
as a sequence of symbols.

The undecidability of the halting problem is the fact that the function fhalt is not computable. The undecidability of the
halting problem is an important fact to keep in mind in designing programming language implementations and
optimizations. It implies that many useful operations on programs cannot be implemented, even in principle.

Proof of the Undecidability of the Halting Problem. Although you will not need to know this proof to understand any other
topic in the book, some of you may be interested in proof that the halting function is not computable. The proof is
surprisingly short, but can be difficult to understand. If you are going to be a serious computer scientist, then you will
want to look at this proof several times, over the course of several days, until you understand the idea behind it.
Step 1: Assume that there is a program Q that solves the halting problem. Specifically, assume that
program Q reads two inputs, both strings, and has the following output:
An important part of this specification for Q is that Q(P, x) always halts for every P and x.

Step 2: Using program Q, we can build a program D that reads one string input and sometimes does
not halt. Specifically, let D be a program that works as follows:

D(P) = if Q(P, P) = halts then run forever else halt.

Note that D has only one input, which it gives twice to Q. The program D can be written in any
reasonable language, as any reasonable language should have some way of programming
if-then-else and some way of writing a loop or recursive function call that runs forever. If you think
about it a little bit, you can see that D has the following behavior:

In this description, the word halt means that D(P) comes to a halt, and runs forever means that D(P)
continues to execute steps indefinitely. The program D(P) halts or does not halt, but does not produce
a string output in any case.

Step 3: Derive a contradiction by considering the behavior D(D) of program D on input D. (If you are
starting to get confused about what it means to run a program with the program itself as input,
assume that we have written the program D and stored it in a file. Then we can compile D and run D
with the file containing a copy of D as input.) Without thinking about how D works or what D is
supposed to do, it is clear that either D(D) halts or D(D) does not halt. If D(D) halts, though, then by
the property of D given in step 2, this must be because D(D) runs forever. This does not make any
sense, so it must be that D(D) runs forever. However, by similar reasoning, if D(D) runs forever, then
this must be because D(D) halts. This is also contradictory. Therefore, we have reached a
contradiction.

Step 4: Because the assumption in step 1 that there is a program Q solving the halting problem leads
to a contradiction in step 3, it must be that the assumption is false. Therefore, there is no program that
solves the halting problem.

Applications

Programming language compilers can often detect errors in programs. However, the undecidability of the halting
problem implies that some properties of programs cannot be determined in advance. The simplest example is halting
itself. Suppose someone writes a program like this:

i=0;
while (i != f(i)) i = g(i);
printf( ... i ...);

It seems very likely that the programmer wants the while loop to halt. Otherwise, why would the programmer have
written a statement to print the value of i after the loop halts? Therefore, it would be helpful for the compiler to print a
warning message if the loop will not halt. However useful this might be, though, it is not possible for a compiler to
determine whether the loop will halt, as this would involve solving the halting problem.
Team-Fly
Random documents with unrelated
content Scribd suggests to you:
all the fact that the house was filled with people, had acted like
magic on the acoustics. The tone of the orchestra had become full,
clear, and incisive. My spirits rose and I forgot everything except the
orchestra before me and Beethoven’s score. After each movement
the applause was deafening, and at the end of the symphony there
was joyous shouting from the galleries. We seemed to have played
our way into their hearts, and after the first part there was a steady
stream of French musicians to my dressing-room to congratulate me
on our marvellous orchestra and its ensemble, and to express their
delight that we had come over on such a friendly mission. Among
them were: Vincent d’Indy, Gabriel Fauré, André Messager, Gabriel
Pierné, Theodore Dubois, Paul Vidal, Nadia Boulanger, and many
others.
As we turned into the French part of our programme the
enthusiasm became still greater, and at the conclusion of “Istar”
some of my first violins discovered the composer, d’Indy, in the
audience and, pointing toward him, stood up to applaud. In a
minute not only the whole orchestra but the audience were on their
feet and with loud cries of “Auteur!” “d’Indy!” the house was in an
uproar until d’Indy, his face as red as a beet, was compelled to rise
and acknowledge this tribute.
The programme finished with the marvellous “Daphnis et Chloe,”
by Ravel, in which the luscious tone of the orchestra and its
virtuosity demonstrated themselves so successfully that not only did
the concert come to a tumultuous climax, but several of the French
papers announced afterward that this work had never had such a
vivid and perfect rendering before.
My interpretation of the Beethoven “Eroica” Symphony puzzled
some of the newspaper critics, as it did not conform to their French
traditions. These do not permit such slight occasional modifications
of tempo as modern conductors brought up in the German traditions
of Beethoven believe essential to a proper interpretation of this
master. But I was much pleased and honored to receive a complete
approval of my interpretation, not only verbally from several of my
French colleagues, but also from M. d’Indy in an article which he
wrote on our concert and in which he said:

Leaving aside everything that Walter Damrosch has done for our country and the
French musicians, generous acts for which our gratitude has often been expressed, I wish
mainly to pay my tribute to the extremely expressive interpretation at the concerts he has
given lately at the Opera. Whether it is classical, romantic, or modern music, Damrosch first
of all endeavors to set off and illustrate what we call the “melos,” the element of
expression, the voice that must rise above all the other voices of the orchestra. He knows
how to distribute the agogic action, the dynamic power, and he is not afraid—even in
Beethoven’s works and in spite of the surprise this caused to our public—to accelerate or
slacken the movement when the necessities of expression demand it.

The French are a courteous people, and at the end of the concert
there was an even greater crowd of musicians and friends behind
the scenes to express their pleasure at our success.
The programmes of the other two concerts were as follows:
MAY 8
1. ...............................................................................................
Overture, “Le Roi d’Ys” Lalo
2. Symphony,
...............................................................................................
“From the New World” Dvořák
3. Concerto
...............................................................................................
for Violin and Orchestra in B Minor Saint-
Saëns
MR. SPALDING
a. “Pélléas et Mélisande” (Fileuse)
4. ............................................................................................... Fauré
b.
...............................................................................................
Ma Mère L’Oye (Les Pagodes) Ravel
5. Prelude
...............................................................................................
to “Die Meistersinger” Wagner

MAY 9
1. Symphony in C (Jupiter)
............................................................................................... Mozart
2. ...............................................................................................
Poems (d’après Verlaine) Loeffler
3. ...............................................................................................
Symphony in D Minor Franck
4. ...............................................................................................
Negro Rhapsody for Piano and Orchestra Powell
JOHN POWELL

The two young American artists, Albert Spalding and John


Powell, made a splendid impression, and of the orchestral works the
Prelude to the “Meistersingers” of Wagner and the Mozart and
Franck Symphonies received special acclaim.
It was delightful to hear the half-suppressed “Ah’s” and “Bravos!”
so characteristic of the French audience after the Andante of the
Mozart Symphony. I confess that the more spontaneous approval
which European audiences give in drama, opera, or concert is
exceedingly gratifying and stimulates the artist to the very best that
is in him. Every artist who is worth his salt will always approach an
audience with the feeling that they are as strangers whom through
his art he must win over as friends. This feeling exists whether he
makes his first bow as a beginner or appears for the three
thousandth time after twenty years of public work. It is a wonderful
moment for him when, after having done his best and given all there
is in him, his audience show by the intensity of their approval that
the “song which he breathed into the air” has found its home “in the
heart of a friend.”
On Sunday morning, May 9, at eleven, the orchestra of the
Conservatoire gave a great party in our honor as a return courtesy
for one that we had given to the French Orchestra on their arrival in
America in 1918. We all met at the Salle du Conservatoire where M.
Leon, representing the Ministry of Fine Arts, was waiting to receive
me. With the Conservatoire Orchestra were various French masters,
including the venerable Gabriel Fauré, and Messager, the conductor.
After various speeches of welcome, I was presented with a
beautiful engraving of Beethoven and made an honorary member of
the Conservatoire Orchestra. We then marched to the Taverne du
Nègre, where luncheon was served. There were so many different
kinds of wine-glasses before each plate that I asked permission to
make a short speech in English to my orchestra. It consisted of the
following:
“Gentlemen, remember we have a concert this afternoon, so
please mix your wine with much water.”
Needless to say, in all the speeches the theme of the war was
constantly played upon by the French orators—how much France
owed to our intervention and to the bravery of our soldiers.
It would have been very pleasant to stay on in Paris, where our
orchestra were beginning to feel very much at home, and rest upon
our young laurels, but our tour had only begun and we had to carry
on!
In the meantime Mr. Engles and our treasurer, Roger Townsend,
had to smooth out all kinds of new difficulties and complications,
among which the passport nuisance was the greatest. War
conditions still prevailed and passports had to be carefully viséd by
the ambassadors of every country we visited. All our orchestra were
practically Americans, but technically they belonged to America,
France, Belgium, Italy, England, Russia, Germany, Austria, and
Czecho-Slovakia. Many of them had had only their first American
papers when the war broke out, and according to war regulations
could not yet obtain their American citizens’ papers. They were
therefore compelled to travel on foreign passports and some of their
visés were exceedingly difficult to obtain, as new countries like
Czecho-Slovakia, for instance, had not yet a properly organized
diplomatic service. Others, like Russia, were not recognized at all
and our Russians had to travel on Kerensky passports issued for
them by the Kerensky ambassador who was still “holding the fort” in
Washington. Through the kindly help of Mr. Grew, councillor at our
embassy in Paris, and other friends in high places, we finally
obtained our hundred visés and left Paris for Bordeaux on May 11,
and—in spite of the railroad strike—with the passage of our train
assured as far as Bordeaux.
The only fly in the ointment was a little revolution before we left
the station. Some of the members of the orchestra had brought their
wives and even a few small children to Europe with them. They very
naturally desired to give their families a good time and wanted to
have them with them and in the orchestra cars on the entire trip. As
railroad space was exceedingly limited and the bachelor and straw-
widower members of the orchestra strenuously objected to this
addition, I had to veto the plan, and painted the difficulties of travel,
hotels, passports, etc., in such lurid fashion that I succeeded in
preventing their departure from Paris with us. The husbands
promised to leave their families in Paris until our return, about three
weeks later, but as all the wives and children came to the station to
see their respective husbands and fathers off, I was nervous until
the last doors of the car were slammed to and the whistle of the
French locomotive, which always sounds like the shrill wail of the
damned, announced that we were really off.
The orchestra were in a very gay mood and insisted on getting
out every time the train stopped even a second, and then having to
be pulled back as the train started again without any warning. A
passport picture of one unfortunate little second violinist was sent
through all the cars, pasted on a piece of paper with the inscription:
“Wanted for bigamy. Member of the New York Symphony Orchestra.
Reward of three francs if returned dead or alive to George Engles,
Manager.” This had been perpetrated by Willem Willeke, who was
not only a master violoncellist but the master mind behind almost
every practical joke indulged in during the tour.
We arrived in Bordeaux that evening and were welcomed at our
hotel by a typical little hotel manager, with his head entirely bald on
top but beautifully covered with the long hair combed forward from
the back of his head. He also had a full beard neatly parted in the
middle, and of course a long double-breasted frock coat. He rubbed
his hands with the pleasure of welcoming us and assured us that all
our rooms were properly reserved. Actually it took us three-quarters
of an hour to get ourselves and our baggage straightened out in the
proper rooms. Our party consisted of Albert and Mrs. Spalding, John
Powell, Mary Flagler, my daughter Gretchen, and myself, and the
highly efficient manager had sent each one of us at first to the
wrong rooms while our bags had still further gone astray. But a good
bath and a delicious dinner at the famous Chapon Fin put us all in
good humor.
The theatre at which we were to play the following evening was
directly opposite to our hotel and its frontal façade is without doubt
the most beautiful I have ever seen. Such examples of the finest
architecture of the eighteenth century stand out in remarkable
contrast to their more modern surroundings and it is difficult to
understand how French architects, with such noble examples to
follow and with a school in Paris which is still considered the best in
the world, should have allowed their art to degenerate to such an
extent within the last thirty years. One has but to compare the noble
façade of the Place de la Concorde with such modern monstrosities
as, for instance, the Hotel Mercedes or the Palais de Justice at Tours,
to realize that in their endeavor to break away completely from their
own noblest traditions they have deliberately courted anarchy, for
their architecture rests upon no laws of beauty or symmetry. Many
of our best American architects are graduates from the École des
Beaux Arts in Paris, but they have not become revolutionaries and
have understood how to adapt their appreciation of the best French
traditions to American needs. The results demonstrate an art of
which every American can be proud.
Our concert, which was given under the auspices of the local
symphony society, was received with great favor. The interior of the
theatre is delightfully intimate, and the audience gave the
impression of belonging to an old musical civilization. We were
presented with huge bouquets of flowers tied with the American
colors. Albert Spalding’s performance made a splendid impression,
and the “Meistersinger” Overture came in for special enthusiasm.
But what was my astonishment at suddenly beholding three of
the “orchestra wives,” who were supposed to have remained in Paris,
seated in one of the boxes. I do not know to this day whether they
rode on the bumpers or in one of the baggage-cars. However, they
were charming ladies; and, as a married man, I could not be too
angry with them or their indulgent husbands. We compromised in
the matter by permitting them to continue with us for the rest of the
tour, provided that they and their husbands occupied space
elsewhere than that reserved for the orchestra, and that they looked
out for their own passports whenever we approached the border.
As we returned to our hotel after the concert the smiling hotel
manager stood in the lobby to receive us and to express his
congratulations at the success of a concert merveilleux. As we
entered the electric lift to go to our respective rooms, he himself
shut the grating on us and pressed the button to send us slowly
upward. (All French lifts move slowly.) Its almost celestial calmness
irresistibly brought the Finale of Gounod’s “Faust” to my mind, when
Marguerite ascends heavenward. I began to sing the melody of the
“Anges radieux,” and just as we got up to the first floor we suddenly
heard the voice of the hotel manager, a vibrant tenor,
enthusiastically continuing the trio from below. I gazed downward
and there he was, his face raised ecstatically toward us and his hand
pressed to his double-breasted frock coat—perhaps a poor hotel
manager but certainly an enthusiastic lover of music.
The newspapers of Bordeaux were full of praise about our
concert, but one of them said: “The orchestra played with that
dryness characteristic of all North Americans.” Alack and alas! Had
the Eighteenth Amendment, which went into effect the previous
January, already made its dreadful influence felt?
Lyons was to be the next city on our itinerary, but unfortunately
the railroad strike had completely isolated it and there was no way of
reaching it from Bordeaux. We were therefore very reluctantly
compelled to cancel the concert. Every seat had been sold long
before, and as Lyons ranked next to Paris in musical importance the
cancellation was a great disappointment to us.
The next morning Engles brought me a telegram which he had
just received from our general manager in Paris, to the effect that at
Marseilles the hall in which we were to play had been condemned by
the fire department as unsafe, and that therefore the concert would
have to be given at another theatre and under different
management. Engles did not like the look of things and begged me,
as he could not speak French, to go with him to Marseilles and look
over the ground with him. We were to have played in Marseilles
under the auspices and management of the local symphonic
organization, which, however, turned out to be but a small and not
very influential body of musicians, most of whom were amateurs.
Their secretary, who was to attend to the details of management,
was a newspaper man and an amateur double-bass player, of which
instrument he was very proud. When we arrived, only two days
before the concert, we found that absolutely nothing had been done
to advertise it. There were no posters, no advertisements, and the
manager of the theatre to which we had been transferred did not
even know before our arrival whether we were a jazz band of
colored people from America or perhaps a troupe of wandering
minstrels.
We were to give two concerts, and at first it seemed as if, under
such disheartening circumstances, it were better to cancel them and
proceed to Monte Carlo and Italy, where already sold-out houses
awaited us. The newspaper man, who was the real delinquent, was
nowhere to be found. He had gone to the country “pour se reposer”
and was not expected until the following day. Luckily the theatre
manager proved to be of the right sort. When he saw what our
organization really stood for he would not hear of cancellation, and
immediately went around to all the newspaper offices with Engles.
Posters, the principal method of advertising in Europe, appeared on
the street corners as if by magic; and while it was too late to attract
a large audience for the first concert, he assured us that if this
concert were the success which he expected, the theatre, which held
about twenty-four hundred people, would be entirely sold out for the
second concert on Sunday afternoon. His prophecy proved correct.
There were not more than eight hundred people at the first concert,
but as they were real sons of the Midi and as they had never heard a
symphonic organization of such size and importance in their lives,
they went mad. They applauded with their hands, with both feet,
with their canes and umbrellas. They shouted in eight-part
harmonies and the rafters of the theatre trembled in sympathy. After
the concert they lined up at the box-office in a great crowd while the
theatre manager, grinning from ear to ear, said: “Did I not tell you?”
In the meantime the delinquent local secretary-manager turned
up and I was fully prepared to annihilate him for his lack of proper
preliminary advertising for our concert, but as he immediately called
me “Cher maître” and expressed his delight in such eloquent French
at the coming of so notable an organization as ours, he completely
spiked my guns and I found myself unable to get in a word
edgewise, much less tell him what I really thought of him.
I have told before that he was an amateur double-bass player in
the local orchestra, and this was evidently the ruling passion of his
life, although I never could understand why an amateur should
choose this particular instrument for his delectation. After the
second concert and while the hall was still ringing with the shouts of
the fiery citizens of Marseilles, he came into my dressing-room as I
thought to add his tribute of praise, but, alas, all he said was: “Cher
maître, I could hardly hear your double-bass players during the
entire concert.” I presume that at the concerts of his orchestra he
was so taken up with his own double-bass part that as he played he
heard nothing of the other instruments around and about him. He
became, so to speak, intoxicated with the resonance of his own
instrument. At our concert, seated in the audience, he suddenly
found, poor man, that the double-bass was not the only pebble on
the orchestral beach, and that occasionally the violins, the wood
winds, or the brasses had also something of importance to
enunciate. It must have been a sad revelation to him, and I do not
wonder that he refused to accept it.
In the meantime the strike fever was spreading in every
direction, and there was not a trolley running through the town of
Marseilles nor a boat leaving the harbor. The effect was a very
curious one, as the streets were filled with great crowds restlessly
moving up and down, and seemingly without work or affairs of any
kind to keep them busy. In several of the streets small bands were
playing in roped-off circles while thirty couples or so were dancing
madly around with hundreds of others outside the ropes watching
them. The huge audience who arrived for our Sunday afternoon
concert must have come on foot, as there was not a wheel turning
anywhere.
After we got back to the hotel the great iron doors were suddenly
closed and bolted, for quite a riot started in front of it. The trolley
company was trying to run a car through the city, manned by young
mechanics from the School of Technology, and every once in a while
a mob of strikers would rush at them, break the windows of the car,
and pull off the young strike-breakers. But it was all done in rather
an amiable fashion, while a crowd of men in light straw hats
applauded with their hands and shouted “Bravo,” all as if it were a
performance gotten up for their pleasure. Then a couple of amiable
gendarmes would come along and in the same placid fashion place
the young men on the car again, which would then proceed for
another few yards or so. Suddenly, however, this seeming comedy
took a tragic turn. The mob made a vicious lunge; they were
stopped by the police who suddenly acted with great energy, and
soon there were several men seriously hurt. In the meantime the
strike-breakers had again connected their car with the electric wire,
and although the car with its broken windows looked a perfect
wreck, it moved triumphantly along the tracks and the strike was
broken. Next morning every car was running again.
Later that afternoon I received a visit from Morris Tivin, the first
double-bass player of our orchestra. He brought with him a boy of
fifteen, a little Russian Jew, who had a most remarkable history. He
had escaped from a prison in Russia and worked his way to
Constantinople. As he was a violinist of exceptional ability, he had
made a meagre living there playing in the cafés. Having read in
some old Paris paper that we were to give a concert in Marseilles he
had quickly made up his mind to get there and perhaps through our
help reach the promised land of America. He arrived in Marseilles as
a stowaway after incredible hardships, and when he introduced
himself to some of his Russian compatriots in my orchestra, he was
literally starving and without a cent in his pockets. Within a few
hours our orchestra had subscribed enough money to send him to
New York with several letters to their colleagues at the Musical
Union, and within a week after his arrival he was engaged as second
concert master at a large salary in one of our Western orchestras.
The generous spirit displayed by our men, which demonstrated
itself in so quick and practical a fashion, is characteristic of the rank
and file of our profession. I have never known a case of an orchestra
musician or chorus singer in need that his colleagues were not
immediately ready to help, and as their own earnings are
comparatively small their generosity is much greater in proportion
than that of many a rich man whose name figures largely among the
subscribers to our charitable organizations.
Our next concert was to be in Monte Carlo, and I motored with
my wife from Marseilles along the Riviera, reaching Monte Carlo on
the evening of May 17. The orchestra had already arrived by train
and were to be found all over the town photographing points of
interest, especially the beautiful statue erected to Hector Berlioz,
which we were all glad to honor. Every orchestra musician adores
this great master, who in his scores has done more than any other to
develop new tone combinations in the symphonic orchestra since
Beethoven and before Wagner.
A great many of our men naturally went to the Casino to behold
the world-famous gambling tables, but if I ever had any worries
about their squandering their earnings they quite disappeared. Many
only watched at the outer edge, or else bet one chip very timidly. An
aged harpy, who looked as though she had played at Monte Carlo
since the time of Napoleon III and who kept a note-book of her
losses and winnings and never bet less than a hundred francs at a
time, took it upon herself to teach one of our talented young flute
players how to play with one white chip. She kept him in a state of
the most panting thrills, while she placed his bets for him.
The next morning I found a note from Jean de Reszke telling me
that he, his wife, and Amhurst Webber would motor over from Nice
for the concert, and asking my wife and me to lunch with him at the
Grand Hotel de Paris, where we were staying. It was such a joy to
see him again. We had not met since 1902, when he had been at
the Metropolitan at the height of his fame and I had conducted
many a glorious “Tristan” performance with him in the title rôle.
Amhurst Webber, a highly talented English musician, had then been
with him as pianist and I had helped him a little with his studies in
composition and instrumentation. Mme. de Reszke I had never had
the pleasure of meeting before. A great tragedy had come upon her,
as their only son had been killed in the first year of the war. It was
heart-breaking to see her, as her face told the story of her
irreparable loss.
The concert in the afternoon took place in the exquisite little
theatre at the Casino. It seats only about four hundred people and
of course every seat was occupied. Jean de Reszke was in the fifth
row of the parquet, and as I came to the “Prize Song” in the
“Meistersinger” Overture, which he had sung so often and so
ravishingly in New York, I could not help but turn around to look at
him. He gave me an immediate smile, but the tears were running
down his face.
At the close of the concert I was solemnly informed by the very
polite little intendant of the theatre that M. Blanc, the principal
owner of the Casino, the opera, the gambling tables, the Hotel de
Paris, in fact everything which draws the hundred-franc notes from
the grateful tourist, had expressed a desire to meet me and to thank
me for the “concert exquis.” I was accordingly piloted to another
part of the building, where, in an anteroom, five or six people were
waiting as if in a doctor’s outer office, while flunkies in livery were
silently walking around or delivering whispered messages to this or
that man. One of these approached my little intendant with a
message, who turned to me and, with a face radiant with pride,
said: “Think of it! He will see us first before all the others!”
We followed the flunky into an inner room where I found a tired-
looking, gray-mustached little man whom I had noticed sleeping in
one of the boxes during about half an hour of the concert. He
congratulated me on the “splendid concert and the exquisite playing
of the orchestra,” and as I sat there I marvelled at it all. Here was a
man whom we in America would call a gambling-house keeper, but
he is certainly a king among them. He has provided his gambling
tables with a setting so exquisite that words cannot describe it.
Nature in her most charming mood, beautiful architecture, delightful
music, exquisite cooking—all these so skilfully combined as to create
an agreeable atmosphere for the thousands who come every year
with full pockets and generally leave with empty ones. Incidentally
he makes millions by thus cleverly pandering to the gambling
instincts which are inherent in almost every man (and woman).
To me the most delightful feature of the concert, except of
course the visit of Jean de Reszke, was a large audience of seventy-
five who sat behind the scenes as there was no room for them in
front. They were the orchestra of the Monte Carlo Opera, an
excellent body of men who embraced us in true southern fashion
between the parts and at the end of the concert.
The next morning I continued the trip by motor to Genoa. As
there had been no strike of any kind in Monte Carlo I thought that
our hoodoo had lifted, but, lo and behold, at Genoa we found only
one old, gray-bearded portier at our hotel to greet us. All the
waiters, porters, chambermaids, cooks, scullions, in fact everything
that could strike in connection with a hotel, were on strike and the
discomfort was considerable. We had looked forward with
pleasurable anticipation to our first Italian dinner. We had dreamed
of fritto misto, spaghetti, and of delicious Italian ices, but these
dreams quickly vanished. There was not even a crust of bread to be
obtained at the hotel. Finally we were furtively conducted through
an alley into the back entrance of a little restaurant by way of the
kitchen, and there we obtained some food, but of the simplest and
poorest variety. The next morning a cup of wretched coffee and a
piece of stale bread at the railroad station made our breakfast, but
luckily for us a kind young American, Mr. Allan, called on us and
whisked us off in his car to his house, where a delicious luncheon
made us forget our deprivations of the night before.
I was again amazed at the cleverness with which the members of
our orchestra adapted themselves to European travelling conditions.
They had all found excellent restaurants and had really fared much
better than we.
We gave our concert at the Teatro Carlo Felice, and our first
Italian audience proved to be even more noisy in their
demonstrations of pleasure than the Midi. I was very much touched
to receive a large wreath tied with the stars and stripes, from the
American Consul-General, who told me after the concert that he
considered such a cultural mission as we were engaged in of as
much importance for cordial relations between our country and Italy
as any business enterprise. He said that music meant so much to the
Italian that he was amazed and delighted to find that Americans did
not only interest themselves in business but also cultivated the arts.
As the Italians had been so bitterly disillusioned regarding President
Wilson, after the phenomenally enthusiastic acclaim which they had
given him on his visit to Rome only a year before, I was not
surprised to have one old gentleman say to me after the concert:
“We do not like your President, but we love the Americans.”
We left next morning by train for Rome. The highly talented
young composer, Signor Vincenzo Tommasini, had interested himself
in our concerts there and had enlisted the sympathies of the
Accademia Santa Cecilia, under whose auspices we were to play at
the Augusteo. The Santa Cecilia, which is composed of musicians
and music lovers, is perhaps the oldest musical organization in the
world, as it was founded by Palestrina. Under the presidency of
Count San Martino it maintains a symphony orchestra which gives a
series of concerts during the winter under its own conductor,
Maestro Molinari, and various guest conductors.
All these concerts are given at the Augusteo, so called because it
was built by Augustus as a tomb for the Cæsars. It is a rotunda built
of the old Roman bricks, but balconies, a stage, and an organ have
been added to it in recent times to adapt it to modern concert
needs. It very likely was an excellent tomb, but its acoustics are
hardly suited for an orchestra. I do not know of any concert-hall built
in circular shape that is satisfactory in that respect. The sound
vibrations seem to travel around and around and great confusion of
tones is the result, especially in such music where changing
harmonies succeed each other rapidly. At our little preliminary
rehearsal the hall was empty with the exception of half a dozen
members of the Santa Cecilia, and as we began to play through a
few bars of the symphony I thought I had suddenly become deaf, as
the sound of the orchestra did not reach me where I stood. But I
remembered our first experience at the Grand Opera House in Paris
and trusted to better conditions when the hall was full. This hope
was justified, as the tone of the orchestra was much clearer and
better balanced at the concert.
After the first and second movements of the “Eroica” Symphony
there were great applause and shouts of “Bravo!” from the boxes
and parquet, but this was immediately followed by very
disconcerting whistling from the top gallery, which seemed to
develop into a kind of duel between the two factions. I was
somewhat disconcerted at this and thought that perhaps something
in our playing had not pleased the galleries, but my friends of the
Accademia Santa Cecilia assured me that this was nothing but a
characteristic little demonstration which often occurred at their
concerts. If the parquet and boxes approved of some particular
composition or rendition the galleries felt it incumbent upon them to
oppose it. I do not know how true this explanation is, but during the
concert the whistling suddenly ceased and after the “Riccardo
Wagner. Tristan e Isotta, Preludio e Morte di Isotta (Lipsia 1813—
Venezia 1883),” as the Italian programme had it, the two factions
seemed to have buried their hatchets completely and were in
absolute harmony as far as their enthusiastic acclaim toward us was
concerned.
During the two days following, the Romans overwhelmed us with
hospitalities. The heat was terrific, but the entire orchestra
responded to an invitation to be presented to the mayor and to visit
the Capitoline Museum, where they were offered a private view of its
art treasures, followed by a luncheon given by the municipality in the
adjoining ruins of the Tabolarium.
On the following morning Tommasini, Molinari, and a few others
of my musician colleagues sauntered into my salon and suggested
that we go to a concert given that morning at the Borghese Gardens
by the famous Banda Communale di Roma. The heat was so
overwhelming that I shuddered at the idea of standing under the
blazing noonday sun listening to a concert, especially as I had to
conduct our own second concert on that afternoon.
“Please come,” said Tommasini.
“No, indeed,” I said. “It is far too hot and I want to do good work
this afternoon.”
“But the concert is given in your honor.”
“Good gracious! Why didn’t you tell me that immediately? Come
along!”
I grabbed my hat and we drove to the Borghese Gardens, where
a crowd of several thousand people were gathered around the
bandstand and where Maestro Vecella was conducting his band in a
beautiful rendition of the Prelude to Wagner’s “Parsifal.” It was a
wonderful performance. His clarinets played the opening unison
phrase with a vibrant and singing quality that I have rarely heard
equalled, and I was struck by the rapt silence with which the huge
audience of Italians listened to it. I, unfortunately, arrived too late to
hear the rendition of Beethoven’s “Fifth Symphony,” which Vecella
himself had arranged for military band and which my musicians
afterward told me had been beautifully performed. The concert
came to a close with a selection of airs from one of the popular
modern Italian operas. To my astonishment and delight, as the band
began to play this or that air, evidently well known to the audience,
groups of men around the bandstand joined in singing it with the
orchestra mezza voce, but with that perfect quality of tone which is
inborn in the Italian race. And then, as the sounds of one group
would die out, another from the other side would take it up, and this
continued until the end of the number. It was a delightful
demonstration of the innate musical genius of the Italian people.
I forgot temporarily that the sun was blazing down with a
fierceness almost unendurable, but after I had thanked Maestro
Vecella for this truly wonderful concert, I begged Molinari and
Tommasini to take me back to my hotel.
“Stay a little while longer,” said Tommasini.
“Impossible!” I answered. “I am melting away and there will be
nothing left of me if I do not get to some shaded spot soon.”
“Oh, but you will,” he said. “The Banda Communale are now
going to present you with the gold medal of the society, with a
special inscription.”
“Why in heaven’s name did you not tell me this sooner?” I said to
my friend, but he simply smiled his inscrutable Italian smile and lit
another cigarette. With the resolve to do or die, I marched along
with them to a private room in a restaurant adjoining the Gardens
and there ices and vermuth were served to the members of the two
musical organizations, and I was presented with the gold Roman
medal, which I treasure very highly as coming from so remarkable a
body of players as the Banda Communale di Roma.
For some years I have been interested in the new musical
development that is going on in Italy. There had been a period when
her church music led the world in the variety and beauty of its form.
Later on, especially in the eighteenth century, she had produced
many composers of distinction in instrumental music, but from then
on and until very recent times, opera had almost completely
monopolized her writers. The splendid opera-houses which are to be
found in her smallest towns are eloquent testimony to the important
place which that form of art occupies in the hearts of the Italian
people. Every Italian can sing, and the critics and lovers of opera are
to be found just as much among the poorer classes as among the
aristocracy.
But all the testimony of older musicians with whom I have
spoken and who have travelled through Italy is to the effect that her
orchestras formerly were of a very poor quality. Their playing was
slovenly and rehearsals few and insufficient. Many of the players in
the opera-houses of even the larger cities followed some other
calling in the daytime, and there was many a tailor or shoemaker
who played his violin in the evening at the opera.
Within the last twenty-five years, however, a complete and
almost miraculous change has come over musical conditions
throughout Italy. Its conservatories in Rome, Milan, Bologna, and
Naples turn out excellent players, and several of her conductors rank
with the best of other countries. Signor Mancinelli, for instance, who
was my colleague during the years that I conducted at the
Metropolitan for Maurice Grau, was a first-class musician and
conductor, well versed in more than Italian music. He was a great
lover of Mozart and gave beautiful performances of the “Magic Flute”
at the Metropolitan. He envied me my job of conducting the Wagner
operas and later on conducted many of them in Italy and Spain.
Toscanini is one of the greatest conductors living to-day. His
range extends to the music of all countries, and I have heard him
conduct Mozart’s “Don Giovanni,” Verdi’s “Falstaff,” and Wagner’s
“Meistersinger” in one week with equal penetration into their
beauties and, incidentally, without an orchestral score in front of
him. He has made a virtue of necessity, as he is almost blind and has
therefore developed his power of memory to a greater extent than I
have ever seen in any other musician, not even excepting Hans von
Bülow.
The result of Italy’s more serious attitude toward instrumental
music shows itself not only in the quality of Italian orchestras, but in
a group of highly talented young composers who devote their
principal efforts to symphonic music, and who are creating works
that rank with the best that other countries are now producing.
Several years ago I produced an orchestral suite written by a boy of
sixteen, Victor di Sabata, which showed remarkable talent and fine
orchestral coloring. Such men as Resphighi, Sinigaglia, Tommasini,
Casella, Pizzetti, and Malipiero have found frequent places on our
programmes, and I expect still further contributions, constantly
growing in importance, from this new development of the musical
genius of Italy.
I was much touched by the interest which our ambassador, Mr.
Johnson, constantly showed in our success and well-being. He had
invited the Queen Mother and several of the young Princesses to our
concerts, and at the many official and governmental functions which
I had to attend he was a sympathetic companion and real brother
artist. He always responded very felicitously when occasion
demanded, and all my Italian musician friends loved him.
At a farewell supper which I gave on the last night John Powell,
whose negro Fantasy had interested our Italian audiences greatly,
and the composer, Malipiero, sat next to each other, but as John
speaks English and Malipiero Italian and French, the silence between
them for about ten minutes was deep and profound. Suddenly they
broke into the most fluent conversation and the words burst forth in
torrents. They had suddenly discovered to their mutual delight that
the German language was a common meeting-ground.
I left Rome very reluctantly. Quite apart from the many personal
friends that I had made there, its eternal beauty again enveloped me
and bade me stay.
I cannot imagine any movement or institution better calculated to
help young American artists to further develop and stimulate their
creative abilities than the American Academy in Rome. It has quite
recently added three music fellowships to those for painters,
sculptors, architects, and archæologists, and, as it has done me the
honor to elect me as one of the trustees and the still greater honor
of giving my name to one of the music fellowships, I revisited Rome
in the spring of 1922 especially to observe the workings of our
academy. I was amazed and delighted beyond words. The academy
is intended for young artists who have already acquired the technic
of their profession. They are selected by competition and are given
absolute freedom from bread worries for three years, the first two of
which they spend at the home of the academy, the Villa Aurelia.
During the third year they may travel or live anywhere in Europe
where they think their artistic aims can be further advanced. Rome
and its surroundings are so romantic and its art treasures so unique
that the perception of beauty and its crystallization into works of art
cannot fail to be further stimulated in those of our American boys
who have the good fortune to achieve a fellowship.
It is, of course, impossible for any man-made institution to
guarantee that every incumbent will develop into a great genius, but
it is certain that as only the best are chosen, they will become still
better through such happy three years, and if among every two
hundred only one real genius is found and thus encouraged the
academy will have justified its existence.
Two of our music fellows had already arrived at the academy, Leo
Sowerby, of Chicago, and Howard Hanson, of San Jose, California,
and had immediately, with characteristic American energy, made
themselves part and parcel of Roman musical life. The Italian
musicians had welcomed them with open arms, and our boys were
constantly found at the concerts and rehearsals of the Santa Cecilia
or having some of their Italian musician friends at the Villa Aurelia
for chamber-music, and a cup of tea in the beautiful gardens
surrounding the villa.
America owes a great debt of gratitude to Major Felix Lamond,
through whose single-mindedness of purpose and energy the fund
has been collected which has made the three music fellowships
possible. He is now continuing the work by giving his life to the
music department of the academy, and as its director acts as guide,
counsellor, and friend to its young incumbents. I must confess that
during my visit I had the constant yearning that I might be forty
years younger and could spend three wonderful years in Rome
under such ideal conditions.
The last night Major Lamond, his wife, and I dined on the roof of
the Villa Aurelia with Director Stevens, who is in supreme charge of
the entire academy. According to Roman custom dinner began after
nine o’clock. Beneath us and stretching out toward the Campagna
was the entire city of Rome with its electric lights appearing like
magic in every direction. Beyond the Campagna rose the mountains,
still visible in the faint twilight. Opposite to us rose the hill of the
Pincio Gardens, and on the left, just visible over the tree tops,
flamed the cross of Saint Peter’s. The silence was profound until
suddenly the bells of Rome began to vibrate from all directions, and
finally, faint but clear, came the sound of a bugle from the military
barracks, blowing the retreat. By this time I was sunk in a silent
ecstasy, but a further climax was yet in store for me, for as the last
notes of the bugle trembled into silence a nightingale from the
bushes directly below us began to pour forth her song.
Florence came next on our orchestral tour and I looked forward
with eagerness after our crowded days of official receptions and
concerts to a day absolutely free from duties of any kind. We arrived
on May 24, and I hoped to sleep deep and late, but at nine o’clock
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookultra.com

You might also like