0% found this document useful (0 votes)
20 views

Programming Language Design Concepts 1st Edition Findlay instant download

The document provides information about the book 'Programming Language Design Concepts' by David A. Watt and William Findlay, which covers various programming language design principles and concepts. It includes sections on programming languages, basic and advanced concepts, and various programming paradigms. Additionally, it offers links to other related programming books and resources available for download.

Uploaded by

akliealemaw
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)
20 views

Programming Language Design Concepts 1st Edition Findlay instant download

The document provides information about the book 'Programming Language Design Concepts' by David A. Watt and William Findlay, which covers various programming language design principles and concepts. It includes sections on programming languages, basic and advanced concepts, and various programming paradigms. Additionally, it offers links to other related programming books and resources available for download.

Uploaded by

akliealemaw
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/ 55

Programming Language Design Concepts 1st Edition

Findlay pdf download

https://ebookname.com/product/programming-language-design-
concepts-1st-edition-findlay/

Get Instant Ebook Downloads – Browse at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Java Programming Exercises Volume One Language


Fundamentals and Core Concepts 1st Edition Christian
Ullenboom

https://ebookname.com/product/java-programming-exercises-volume-
one-language-fundamentals-and-core-concepts-1st-edition-
christian-ullenboom/

Programming Language Foundations 1st Edition Aaron


Stump

https://ebookname.com/product/programming-language-
foundations-1st-edition-aaron-stump/

MIPS Assembly Language Programming Robert Britton

https://ebookname.com/product/mips-assembly-language-programming-
robert-britton/

Renin Angiotensin System and Cardiovascular Disease 1st


Edition Walmor C. Demello Md

https://ebookname.com/product/renin-angiotensin-system-and-
cardiovascular-disease-1st-edition-walmor-c-demello-md/
Computer Viruses For Dummies Peter H. Gregory

https://ebookname.com/product/computer-viruses-for-dummies-peter-
h-gregory/

Ágrip af Nóregskonungas■gum A Twelfth Century Synoptic


History of the Kings of Norway 2nd Revised Edition
Matthew James Driscoll

https://ebookname.com/product/agrip-af-noregskonungas%c7%abgum-a-
twelfth-century-synoptic-history-of-the-kings-of-norway-2nd-
revised-edition-matthew-james-driscoll/

Buddhist Public Advocacy and Activism in Thailand A


Rhetoric of Dignity and Duty 2024th Edition Craig M.
Pinkerton

https://ebookname.com/product/buddhist-public-advocacy-and-
activism-in-thailand-a-rhetoric-of-dignity-and-duty-2024th-
edition-craig-m-pinkerton/

Historical Linguistics 2005 Selected Papers from the


17th International Conference on Historical Linguistics
Madison Wisconsin 31 July 5 August 2005 1st Edition
Joseph C. Salmons
https://ebookname.com/product/historical-
linguistics-2005-selected-papers-from-the-17th-international-
conference-on-historical-linguistics-madison-
wisconsin-31-july-5-august-2005-1st-edition-joseph-c-salmons/

Critical Companion to T S Eliot A Literary Reference to


His Life and Work 1st Edition Russell Elliott Murphy

https://ebookname.com/product/critical-companion-to-t-s-eliot-a-
literary-reference-to-his-life-and-work-1st-edition-russell-
elliott-murphy/
Atoms and materials 1st Edition Kyle

https://ebookname.com/product/atoms-and-materials-1st-edition-
kyle/
PROGRAMMING LANGUAGE
DESIGN CONCEPTS
PROGRAMMING LANGUAGE
DESIGN CONCEPTS

David A. Watt, University of Glasgow


with contributions by

William Findlay, University of Glasgow


Copyright  2004 John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester,
West Sussex PO19 8SQ, England

Telephone (+44) 1243 779777

Email (for orders and customer service enquiries): cs-books@wiley.co.uk


Visit our Home Page on www.wileyeurope.com or www.wiley.com

All Rights Reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in
any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except under
the terms of the Copyright, Designs and Patents Act 1988 or under the terms of a licence issued by the Copyright
Licensing Agency Ltd, 90 Tottenham Court Road, London W1T 4LP, UK, without the permission in writing of the
Publisher, with the exception of any material supplied specifically for the purpose of being entered and executed
on a computer system for exclusive use by the purchase of the publication. Requests to the Publisher should be
addressed to the Permissions Department, John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West
Sussex PO19 8SQ, England, or emailed to permreq@wiley.co.uk, or faxed to (+44) 1243 770620.

This publication is designed to provide accurate and authoritative information in regard to the subject matter
covered. It is sold on the understanding that the Publisher is not engaged in rendering professional services. If
professional advice or other expert assistance is required, the services of a competent professional should be sought.

ADA is a registered trademark of the US Government Ada Joint Program Office.

JAVA is a registered trademark of Sun Microsystems Inc.

OCCAM is a registered trademark of the INMOS Group of Companies.

UNIX is a registered trademark of AT&T Bell Laboratories.

Other Wiley Editorial Offices

John Wiley & Sons Inc., 111 River Street, Hoboken, NJ 07030, USA

Jossey-Bass, 989 Market Street, San Francisco, CA 94103-1741, USA

Wiley-VCH Verlag GmbH, Boschstr. 12, D-69469 Weinheim, Germany

John Wiley & Sons Australia Ltd, 33 Park Road, Milton, Queensland 4064, Australia

John Wiley & Sons (Asia) Pte Ltd, 2 Clementi Loop #02-01, Jin Xing Distripark, Singapore 129809

John Wiley & Sons Canada Ltd, 22 Worcester Road, Etobicoke, Ontario, Canada M9W 1L1

Wiley also publishes its books in a variety of electronic formats. Some content that appears
in print may not be available in electronic books.

Library of Congress Cataloging-in-Publication Data

Watt, David A. (David Anthony)


Programming language design concepts / David A. Watt ; with
contributions by William Findlay.
p. cm.
Includes bibliographical references and index.
ISBN 0-470-85320-4 (pbk. : alk. paper)
1. Programming languages (Electronic computers) I. Findlay, William,
1947- II. Title.

QA76.7 .W388 2004


005.13 – dc22
2003026236
British Library Cataloguing in Publication Data

A catalogue record for this book is available from the British Library

ISBN 0-470-85320-4

Typeset in 10/12pt TimesTen by Laserwords Private Limited, Chennai, India


Printed and bound in Great Britain by Biddles Ltd, King’s Lynn
This book is printed on acid-free paper responsibly manufactured from sustainable forestry
in which at least two trees are planted for each one used for paper production.
To Carol
Contents

Preface xv

Part I: Introduction 1
1 Programming languages 3
1.1 Programming linguistics 3
1.1.1 Concepts and paradigms 3
1.1.2 Syntax, semantics, and pragmatics 5
1.1.3 Language processors 6
1.2 Historical development 6
Summary 10
Further reading 10
Exercises 10

Part II: Basic Concepts 13


2 Values and types 15
2.1 Types 15
2.2 Primitive types 16
2.2.1 Built-in primitive types 16
2.2.2 Defined primitive types 18
2.2.3 Discrete primitive types 19
2.3 Composite types 20
2.3.1 Cartesian products, structures, and records 21
2.3.2 Mappings, arrays, and functions 23
2.3.3 Disjoint unions, discriminated records, and objects 27
2.4 Recursive types 33
2.4.1 Lists 33
2.4.2 Strings 35
2.4.3 Recursive types in general 36
2.5 Type systems 37
2.5.1 Static vs dynamic typing 38
2.5.2 Type equivalence 40
2.5.3 The Type Completeness Principle 42
2.6 Expressions 43
2.6.1 Literals 43
2.6.2 Constructions 44
2.6.3 Function calls 46
2.6.4 Conditional expressions 47
2.6.5 Iterative expressions 48
2.6.6 Constant and variable accesses 49

vii
viii Contents

2.7 Implementation notes 49


2.7.1 Representation of primitive types 49
2.7.2 Representation of Cartesian products 50
2.7.3 Representation of arrays 50
2.7.4 Representation of disjoint unions 51
2.7.5 Representation of recursive types 51
Summary 52
Further reading 52
Exercises 52

3 Variables and storage 57


3.1 Variables and storage 57
3.2 Simple variables 58
3.3 Composite variables 59
3.3.1 Total vs selective update 60
3.3.2 Static vs dynamic vs flexible arrays 61
3.4 Copy semantics vs reference semantics 63
3.5 Lifetime 66
3.5.1 Global and local variables 66
3.5.2 Heap variables 68
3.5.3 Persistent variables 71
3.6 Pointers 73
3.6.1 Pointers and recursive types 74
3.6.2 Dangling pointers 75
3.7 Commands 77
3.7.1 Skips 77
3.7.2 Assignments 77
3.7.3 Proper procedure calls 78
3.7.4 Sequential commands 79
3.7.5 Collateral commands 79
3.7.6 Conditional commands 80
3.7.7 Iterative commands 82
3.8 Expressions with side effects 85
3.8.1 Command expressions 86
3.8.2 Expression-oriented languages 87
3.9 Implementation notes 87
3.9.1 Storage for global and local variables 88
3.9.2 Storage for heap variables 89
3.9.3 Representation of dynamic and flexible arrays 90
Summary 91
Further reading 91
Exercises 92

4 Bindings and scope 95


4.1 Bindings and environments 95
4.2 Scope 97
Contents ix

4.2.1 Block structure 97


4.2.2 Scope and visibility 99
4.2.3 Static vs dynamic scoping 100
4.3 Declarations 102
4.3.1 Type declarations 102
4.3.2 Constant declarations 104
4.3.3 Variable declarations 104
4.3.4 Procedure definitions 105
4.3.5 Collateral declarations 105
4.3.6 Sequential declarations 106
4.3.7 Recursive declarations 107
4.3.8 Scopes of declarations 108
4.4 Blocks 108
4.4.1 Block commands 109
4.4.2 Block expressions 110
4.4.3 The Qualification Principle 110
Summary 111
Further reading 112
Exercises 112

5 Procedural abstraction 115


5.1 Function procedures and proper procedures 115
5.1.1 Function procedures 116
5.1.2 Proper procedures 118
5.1.3 The Abstraction Principle 120
5.2 Parameters and arguments 122
5.2.1 Copy parameter mechanisms 124
5.2.2 Reference parameter mechanisms 125
5.2.3 The Correspondence Principle 128
5.3 Implementation notes 129
5.3.1 Implementation of procedure calls 130
5.3.2 Implementation of parameter mechanisms 130
Summary 131
Further reading 131
Exercises 131

Part III: Advanced Concepts 133


6 Data abstraction 135
6.1 Program units, packages, and encapsulation 135
6.1.1 Packages 136
6.1.2 Encapsulation 137
6.2 Abstract types 140
6.3 Objects and classes 145
6.3.1 Classes 146
6.3.2 Subclasses and inheritance 151
x Contents

6.3.3 Abstract classes 157


6.3.4 Single vs multiple inheritance 160
6.3.5 Interfaces 162
6.4 Implementation notes 164
6.4.1 Representation of objects 164
6.4.2 Implementation of method calls 165
Summary 166
Further reading 167
Exercises 167

7 Generic abstraction 171


7.1 Generic units and instantiation 171
7.1.1 Generic packages in ADA 172
7.1.2 Generic classes in C++ 174
7.2 Type and class parameters 176
7.2.1 Type parameters in ADA 176
7.2.2 Type parameters in C++ 180
7.2.3 Class parameters in JAVA 183
7.3 Implementation notes 186
7.3.1 Implementation of ADA generic units 186
7.3.2 Implementation of C++ generic units 187
7.3.3 Implementation of JAVA generic units 188
Summary 188
Further reading 189
Exercises 189

8 Type systems 191


8.1 Inclusion polymorphism 191
8.1.1 Types and subtypes 191
8.1.2 Classes and subclasses 195
8.2 Parametric polymorphism 198
8.2.1 Polymorphic procedures 198
8.2.2 Parameterized types 200
8.2.3 Type inference 202
8.3 Overloading 204
8.4 Type conversions 207
8.5 Implementation notes 208
8.5.1 Implementation of parametric polymorphism 208
Summary 210
Further reading 210
Exercises 211

9 Control flow 215


9.1 Sequencers 215
9.2 Jumps 216
9.3 Escapes 218
Contents xi

9.4 Exceptions 221


9.5 Implementation notes 226
9.5.1 Implementation of jumps and escapes 226
9.5.2 Implementation of exceptions 227
Summary 227
Further reading 228
Exercises 228

10 Concurrency 231
10.1 Why concurrency? 231
10.2 Programs and processes 233
10.3 Problems with concurrency 234
10.3.1 Nondeterminism 234
10.3.2 Speed dependence 234
10.3.3 Deadlock 236
10.3.4 Starvation 237
10.4 Process interactions 238
10.4.1 Independent processes 238
10.4.2 Competing processes 238
10.4.3 Communicating processes 239
10.5 Concurrency primitives 240
10.5.1 Process creation and control 241
10.5.2 Interrupts 243
10.5.3 Spin locks and wait-free algorithms 243
10.5.4 Events 248
10.5.5 Semaphores 249
10.5.6 Messages 251
10.5.7 Remote procedure calls 252
10.6 Concurrent control abstractions 253
10.6.1 Conditional critical regions 253
10.6.2 Monitors 255
10.6.3 Rendezvous 256
Summary 258
Further reading 258
Exercises 259

Part IV: Paradigms 263

11 Imperative programming 265


11.1 Key concepts 265
11.2 Pragmatics 266
11.2.1 A simple spellchecker 268
11.3 Case study: C 269
11.3.1 Values and types 269
11.3.2 Variables, storage, and control 272
xii Contents

11.3.3 Bindings and scope 274


11.3.4 Procedural abstraction 274
11.3.5 Independent compilation 275
11.3.6 Preprocessor directives 276
11.3.7 Function library 277
11.3.8 A simple spellchecker 278
11.4 Case study: ADA 281
11.4.1 Values and types 281
11.4.2 Variables, storage, and control 282
11.4.3 Bindings and scope 282
11.4.4 Procedural abstraction 283
11.4.5 Data abstraction 283
11.4.6 Generic abstraction 285
11.4.7 Separate compilation 288
11.4.8 Package library 289
11.4.9 A simple spellchecker 289
Summary 292
Further reading 293
Exercises 293

12 Object-oriented programming 297


12.1 Key concepts 297
12.2 Pragmatics 298
12.3 Case study: C++ 299
12.3.1 Values and types 300
12.3.2 Variables, storage, and control 300
12.3.3 Bindings and scope 300
12.3.4 Procedural abstraction 301
12.3.5 Data abstraction 302
12.3.6 Generic abstraction 306
12.3.7 Independent compilation and preprocessor directives 307
12.3.8 Class and template library 307
12.3.9 A simple spellchecker 308
12.4 Case study: JAVA 311
12.4.1 Values and types 312
12.4.2 Variables, storage, and control 313
12.4.3 Bindings and scope 314
12.4.4 Procedural abstraction 314
12.4.5 Data abstraction 315
12.4.6 Generic abstraction 317
12.4.7 Separate compilation and dynamic linking 318
12.4.8 Class library 319
12.4.9 A simple spellchecker 320
12.5 Case study: ADA95 322
12.5.1 Types 322
12.5.2 Data abstraction 325
Contents xiii

Summary 328
Further reading 328
Exercises 329

13 Concurrent programming 333


13.1 Key concepts 333
13.2 Pragmatics 334
13.3 Case study: ADA95 336
13.3.1 Process creation and termination 336
13.3.2 Mutual exclusion 338
13.3.3 Admission control 339
13.3.4 Scheduling away deadlock 347
13.4 Case study: JAVA 355
13.4.1 Process creation and termination 356
13.4.2 Mutual exclusion 358
13.4.3 Admission control 359
13.5 Implementation notes 361
Summary 363
Further reading 363
Exercises 363

14 Functional programming 367


14.1 Key concepts 367
14.1.1 Eager vs normal-order vs lazy evaluation 368
14.2 Pragmatics 370
14.3 Case study: HASKELL 370
14.3.1 Values and types 370
14.3.2 Bindings and scope 374
14.3.3 Procedural abstraction 376
14.3.4 Lazy evaluation 379
14.3.5 Data abstraction 381
14.3.6 Generic abstraction 382
14.3.7 Modeling state 384
14.3.8 A simple spellchecker 386
Summary 387
Further reading 388
Exercises 389

15 Logic programming 393


15.1 Key concepts 393
15.2 Pragmatics 396
15.3 Case study: PROLOG 396
15.3.1 Values, variables, and terms 396
15.3.2 Assertions and clauses 398
15.3.3 Relations 398
15.3.4 The closed-world assumption 402
15.3.5 Bindings and scope 403
xiv Contents

15.3.6 Control 404


15.3.7 Input/output 406
15.3.8 A simple spellchecker 407
Summary 409
Further reading 410
Exercises 410
16 Scripting 413
16.1 Pragmatics 413
16.2 Key concepts 414
16.2.1 Regular expressions 415
16.3 Case study: PYTHON 417
16.3.1 Values and types 418
16.3.2 Variables, storage, and control 419
16.3.3 Bindings and scope 421
16.3.4 Procedural abstraction 421
16.3.5 Data abstraction 422
16.3.6 Separate compilation 424
16.3.7 Module library 425
Summary 427
Further reading 427
Exercises 427

Part V: Conclusion 429


17 Language selection 431
17.1 Criteria 431
17.2 Evaluation 433
Summary 436
Exercises 436
18 Language design 437
18.1 Selection of concepts 437
18.2 Regularity 438
18.3 Simplicity 438
18.4 Efficiency 441
18.5 Syntax 442
18.6 Language life cycles 444
18.7 The future 445
Summary 446
Further reading 446
Exercises 447
Bibliography 449
Glossary 453
Index 465
Preface

The first programming language I ever learned was ALGOL60. This language was
notable for its elegance and its regularity; for all its imperfections, it stood head and
shoulders above its contemporaries. My interest in languages was awakened, and
I began to perceive the benefits of simplicity and consistency in language design.
Since then I have learned and programmed in about a dozen other languages,
and I have struck a nodding acquaintance with many more. Like many pro-
grammers, I have found that certain languages make programming distasteful, a
drudgery; others make programming enjoyable, even esthetically pleasing. A good
language, like a good mathematical notation, helps us to formulate and communi-
cate ideas clearly. My personal favorites have been PASCAL, ADA, ML, and JAVA.
Each of these languages has sharpened my understanding of what programming
is (or should be) all about. PASCAL taught me structured programming and data
types. ADA taught me data abstraction, exception handling, and large-scale pro-
gramming. ML taught me functional programming and parametric polymorphism.
JAVA taught me object-oriented programming and inclusion polymorphism. I had
previously met all of these concepts, and understood them in principle, but I did
not truly understand them until I had the opportunity to program in languages
that exposed them clearly.

Contents
This book consists of five parts.
Chapter 1 introduces the book with an overview of programming linguistics
(the study of programming languages) and a brief history of programming and
scripting languages.
Chapters 2–5 explain the basic concepts that underlie almost all programming
languages: values and types, variables and storage, bindings and scope, procedures
and parameters. The emphasis in these chapters is on identifying the basic
concepts and studying them individually. These basic concepts are found in almost
all languages.
Chapters 6–10 continue this theme by examining some more advanced con-
cepts: data abstraction (packages, abstract types, and classes), generic abstraction
(or templates), type systems (inclusion polymorphism, parametric polymor-
phism, overloading, and type conversions), sequencers (including exceptions), and
concurrency (primitives, conditional critical regions, monitors, and rendezvous).
These more advanced concepts are found in the more modern languages.
Chapters 11–16 survey the most important programming paradigms, compar-
ing and contrasting the long-established paradigm of imperative programming
with the increasingly important paradigms of object-oriented and concurrent pro-
gramming, the more specialized paradigms of functional and logic programming,
and the paradigm of scripting. These different paradigms are based on different

xv
xvi Preface

selections of key concepts, and give rise to sharply contrasting styles of language
and of programming. Each chapter identifies the key concepts of the subject
paradigm, and presents an overview of one or more major languages, showing
how concepts were selected and combined when the language was designed.
Several designs and implementations of a simple spellchecker are presented to
illustrate the pragmatics of programming in all of the major languages.
Chapters 17 and 18 conclude the book by looking at two issues: how to select
a suitable language for a software development project, and how to design a
new language.
The book need not be read sequentially. Chapters 1–5 should certainly be
read first, but the remaining chapters could be read in many different orders.
Chapters 11–15 are largely self-contained; my recommendation is to read at least
some of them after Chapters 1–5, in order to gain some insight into how major
languages have been designed. Figure P.1 summarizes the dependencies between
the chapters.

Examples and case studies


The concepts studied in Chapters 2–10 are freely illustrated by examples. These
examples are drawn primarily from C, C++, JAVA, and ADA. I have chosen these
languages because they are well known, they contrast well, and even their flaws
are instructive!

1
Introduction

2 3 4 5
Values and Variables and Bindings and Procedural
Types Storage Scope Abstraction

6 7 8 9 10
Data Generic Type Control Concurrency
Abstraction Abstraction Systems Flow

11 12 13 14 15 16
Imperative OO Concurrent Functional Logic Scripting
Programming Programming Programming Programming Programming

17 18
Language Language
Selection Design

Figure P.1 Dependencies between chapters of this book.


Preface xvii

The paradigms studied in Chapters 11–16 are illustrated by case studies of


major languages: ADA, C, C++, HASKELL, JAVA, PROLOG, and PYTHON. These
languages are studied only impressionistically. It would certainly be valuable for
readers to learn to program in all of these languages, in order to gain deeper insight,
but this book makes no attempt to teach programming per se. The bibliography
contains suggested reading on all of these languages.

Exercises
Each chapter is followed by a number of relevant exercises. These vary from
short exercises, through longer ones (marked *), up to truly demanding ones
(marked **) that could be treated as projects.
A typical exercise is to analyze some aspect of a favorite language, in the
same way that various languages are analyzed in the text. Exercises like this are
designed to deepen readers’ understanding of languages that they already know,
and to reinforce understanding of particular concepts by studying how they are
supported by different languages.
A typical project is to design some extension or modification to an existing
language. I should emphasize that language design should not be undertaken
lightly! These projects are aimed particularly at the most ambitious readers, but
all readers would benefit by at least thinking about the issues raised.

Readership
All programmers, not just language specialists, need a thorough understanding
of language concepts. This is because programming languages are our most
fundamental tools. They influence the very way we think about software design
and implementation, about algorithms and data structures.
This book is aimed at junior, senior, and graduate students of computer
science and information technology, all of whom need some understanding of
the fundamentals of programming languages. The book should also be of inter-
est to professional software engineers, especially project leaders responsible
for language evaluation and selection, designers and implementers of language
processors, and designers of new languages and of extensions to existing languages.
To derive maximum benefit from this book, the reader should be able to
program in at least two contrasting high-level languages. Language concepts can
best be understood by comparing how they are supported by different languages. A
reader who knows only a language like C, C++, or JAVA should learn a contrasting
language such as ADA (or vice versa) at the same time as studying this book.
The reader will also need to be comfortable with some elementary concepts
from discrete mathematics – sets, functions, relations, and predicate logic – as
these are used to explain a variety of language concepts. The relevant mathematical
concepts are briefly reviewed in Chapters 2 and 15, in order to keep this book
reasonably self-contained.
This book attempts to cover all the most important aspects of a large subject.
Where necessary, depth has been sacrificed for breadth. Thus the really serious
xviii Preface

student will need to follow up with more advanced studies. The book has an
extensive bibliography, and each chapter closes with suggestions for further
reading on the topics covered by the chapter.

Acknowledgments
Bob Tennent’s classic book Programming Language Principles has profoundly
influenced the way I have organized this book. Many books on programming
languages have tended to be syntax-oriented, examining several popular languages
feature by feature, without offering much insight into the underlying concepts
or how future languages might be designed. Some books are implementation-
oriented, attempting to explain concepts by showing how they are implemented
on computers. By contrast, Tennent’s book is semantics-oriented, first identifying
and explaining powerful and general semantic concepts, and only then analyzing
particular languages in terms of these concepts. In this book I have adopted Ten-
nent’s semantics-oriented approach, but placing far more emphasis on concepts
that have become more prominent in the intervening two decades.
I have also been strongly influenced, in many different ways, by the work
of Malcolm Atkinson, Peter Buneman, Luca Cardelli, Frank DeRemer, Edsger
Dijkstra, Tony Hoare, Jean Ichbiah, John Hughes, Mehdi Jazayeri, Bill Joy, Robin
Milner, Peter Mosses, Simon Peyton Jones, Phil Wadler, and Niklaus Wirth.
I wish to thank Bill Findlay for the two chapters (Chapters 10 and 13) he has
contributed to this book. His expertise on concurrent programming has made this
book broader in scope than I could have made it myself. His numerous suggestions
for my own chapters have been challenging and insightful.
Last but not least, I would like to thank the Wiley reviewers for their
constructive criticisms, and to acknowledge the assistance of the Wiley editorial
staff led by Gaynor Redvers-Mutton.

David A. Watt
Brisbane
March 2004
PART I

INTRODUCTION

Part I introduces the book with an overview of programming linguistics and a


brief history of programming and scripting languages.

1
Chapter 1

Programming languages

In this chapter we shall:


• outline the discipline of programming linguistics, which is the study of program-
ming languages, encompassing concepts and paradigms, syntax, semantics, and
pragmatics, and language processors such as compilers and interpreters;
• briefly survey the historical development of programming languages, covering the
major programming languages and paradigms.

1.1 Programming linguistics


The first high-level programming languages were designed during the 1950s. Ever
since then, programming languages have been a fascinating and productive area
of study. Programmers endlessly debate the relative merits of their favorite pro-
gramming languages, sometimes with almost religious zeal. On a more academic
level, computer scientists search for ways to design programming languages that
combine expressive power with simplicity and efficiency.
We sometimes use the term programming linguistics to mean the study of
programming languages. This is by analogy with the older discipline of linguistics,
which is the study of natural languages. Both programming languages and natural
languages have syntax (form) and semantics (meaning). However, we cannot take
the analogy too far. Natural languages are far broader, more expressive, and
subtler than programming languages. A natural language is just what a human
population speaks and writes, so linguists are restricted to analyzing existing (and
dead) natural languages. On the other hand, programming linguists can not only
analyze existing programming languages; they can also design and specify new
programming languages, and they can implement these languages on computers.
Programming linguistics therefore has several aspects, which we discuss briefly
in the following subsections.

1.1.1 Concepts and paradigms


Every programming language is an artifact, and as such has been consciously
designed. Some programming languages have been designed by a single person
(such as C++), others by small groups (such as C and JAVA), and still others by
large groups (such as ADA).
A programming language, to be worthy of the name, must satisfy certain
fundamental requirements.

3
4 Chapter 1 Programming languages

A programming language must be universal. That is to say, every problem


must have a solution that can be programmed in the language, if that problem can
be solved at all by a computer. This might seem to be a very strong requirement,
but even a very small programming language can meet it. Any language in which
we can define recursive functions is universal. On the other hand, a language with
neither recursion nor iteration cannot be universal. Certain application languages
are not universal, but we do not generally classify them as programming languages.
A programming language should also be reasonably natural for solving prob-
lems, at least problems within its intended application area. For example, a
programming language whose only data types are numbers and arrays might be
natural for solving numerical problems, but would be less natural for solving prob-
lems in commerce or artificial intelligence. Conversely, a programming language
whose only data types are strings and lists would be an unnatural choice for solving
numerical problems.
A programming language must also be implementable on a computer. That is
to say, it must be possible to execute every well-formed program in the language.
Mathematical notation (in its full generality) is not implementable, because in
this notation it is possible to formulate problems that cannot be solved by any
computer. Natural languages also are not implementable, because they are impre-
cise and ambiguous. Therefore, mathematical notation and natural languages, for
entirely different reasons, cannot be classified as programming languages.
In practice, a programming language should be capable of an acceptably
efficient implementation. There is plenty of room for debate over what is acceptably
efficient, especially as the efficiency of a programming language implementation
is strongly influenced by the computer architecture. FORTRAN, C, and PASCAL
programmers might expect their programs to be almost as efficient (within a factor
of 2–4) as the corresponding assembly-language programs. PROLOG programmers
have to accept an order of magnitude lower efficiency, but would justify this on
the grounds that the language is far more natural within its own application area;
besides, they hope that new computer architectures will eventually appear that
are more suited for executing PROLOG programs than conventional architectures.
In Parts II and III of this book we shall study the concepts that underlie
the design of programming languages: data and types, variables and storage,
bindings and scope, procedural abstraction, data abstraction, generic abstraction,
type systems, control, and concurrency. Although few of us will ever design a
programming language (which is extremely difficult to do well), as programmers
we can all benefit by studying these concepts. Programming languages are our
most basic tools, and we must thoroughly master them to use them effectively.
Whenever we have to learn a new programming language and discover how it
can be effectively exploited to construct reliable and maintainable programs, and
whenever we have to decide which programming language is most suitable for
solving a given problem, we find that a good understanding of programming
language concepts is indispensable. We can master a new programming language
most effectively if we understand the underlying concepts that it shares with other
programming languages.
1.1 Programming linguistics 5

Just as important as the individual concepts are the ways in which they may
be put together to design complete programming languages. Different selections
of key concepts support radically different styles of programming, which are
called paradigms. There are six major paradigms. Imperative programming is
characterized by the use of variables, commands, and procedures; object-oriented
programming by the use of objects, classes, and inheritance; concurrent pro-
gramming by the use of concurrent processes, and various control abstractions;
functional programming by the use of functions; logic programming by the use of
relations; and scripting languages by the presence of very high-level features. We
shall study all of these paradigms in Part IV of this book.

1.1.2 Syntax, semantics, and pragmatics


Every programming language has syntax, semantics, and pragmatics. We have
seen that natural languages also have syntax and semantics, but pragmatics is
unique to programming languages.
• A programming language’s syntax is concerned with the form of programs:
how expressions, commands, declarations, and other constructs must be
arranged to make a well-formed program.
• A programming language’s semantics is concerned with the meaning of
programs: how a well-formed program may be expected to behave when
executed on a computer.
• A programming language’s pragmatics is concerned with the way in which
the language is intended to be used in practice.
Syntax influences how programs are written by the programmer, read by
other programmers, and parsed by the computer. Semantics determines how
programs are composed by the programmer, understood by other programmers,
and interpreted by the computer. Pragmatics influences how programmers are
expected to design and implement programs in practice. Syntax is important, but
semantics and pragmatics are more important still.
To underline this point, consider how an expert programmer thinks, given a
programming problem to solve. Firstly, the programmer decomposes the prob-
lem, identifying suitable program units (procedures, packages, abstract types,
or classes). Secondly, the programmer conceives a suitable implementation of
each program unit, deploying language concepts such as types, control structures,
exceptions, and so on. Lastly, the programmer codes each program unit. Only at
this last stage does the programming language’s syntax become relevant.
In this book we shall pay most attention to semantic and pragmatic issues. A
given construct might be provided in several programming languages, with varia-
tions in syntax that are essentially superficial. Semantic issues are more important.
We need to appreciate subtle differences in meaning between apparently similar
constructs. We need to see whether a given programming language confuses dis-
tinct concepts, or supports an important concept inadequately, or fails to support
it at all. In this book we study those concepts that are so important that they are
supported by a variety of programming languages.
6 Chapter 1 Programming languages

In order to avoid distracting syntactic variations, wherever possible we shall


illustrate each concept using the following programming languages: C, C++, JAVA,
and ADA. C is now middle-aged, and its design defects are numerous; however, it is
very widely known and used, and even its defects are instructive. C++ and JAVA are
modern and popular object-oriented languages. ADA is a programming language
that supports imperative, object-oriented, and concurrent programming. None of
these programming languages is by any means perfect. The ideal programming
language has not yet been designed, and is never likely to be!

1.1.3 Language processors


This book is concerned only with high-level languages, i.e., programming languages
that are (more or less) independent of the machines on which programs are
executed. High-level languages are implemented by compiling programs into
machine language, by interpreting them directly, or by some combination of
compilation and interpretation.
Any system for processing programs – executing programs, or preparing them
for execution – is called a language processor. Language processors include com-
pilers, interpreters, and auxiliary tools like source-code editors and debuggers.
We have seen that a programming language must be implementable. However,
this does not mean that programmers need to know in detail how a programming
language is implemented in order to understand it thoroughly. Accordingly,
implementation issues will receive limited attention in this book, except for a
short section (‘‘Implementation notes’’) at the end of each chapter.

1.2 Historical development


Today’s programming languages are the product of developments that started in
the 1950s. Numerous concepts have been invented, tested, and improved by being
incorporated in successive programming languages. With very few exceptions, the
design of each programming language has been strongly influenced by experience
with earlier languages. The following brief historical survey summarizes the
ancestry of the major programming languages and sketches the development of
the concepts introduced in this book. It also reminds us that today’s programming
languages are not the end product of developments in programming language
design; exciting new concepts, languages, and paradigms are still being developed,
and the programming language scene ten years from now will probably be rather
different from today’s.
Figure 1.1 summarizes the dates and ancestry of several important program-
ming languages. This is not the place for a comprehensive survey, so only the
major programming languages are mentioned.
FORTRAN was the earliest major high-level language. It introduced symbolic
expressions and arrays, and also procedures (‘‘subroutines’’) with parameters. In
other respects FORTRAN (in its original form) was fairly low-level; for example, con-
trol flow was largely effected by conditional and unconditional jumps. FORTRAN has
developed a long way from its original design; the latest version was standardized
as recently as 1997.
Exploring the Variety of Random
Documents with Different Content
"You!"

"Why not? In reading 'A Whim of Fate,' I could not go to rest


without knowing the end, and I feel a like curiosity toward this
tragedy of real life. I shall not be content till I learn the truth. My
feelings are precisely the same as your own. Therefore," pursued
Tait, with emphasis, "I propose to assist you in your search. We will
discuss the matter calmly, and see what is best to be done. In spite
of the lapse of five-and-twenty years, who knows but what we may
lay hands on the murderer of your father, who is no doubt now living
in fancied security."

"Unless he is dead."

"Who is making the objections now?" said Tait, smiling. "Well,


Claude, will you accept me as your brother detective in this matter?"

"Willingly, and I thank you for this proof of your friendship."

"I am afraid there is an element of selfishness mixed up in my


offer," said Tait, shrugging his shoulders. "It is not every day that
one can find an interesting case like this to dissect. Excitement is the
joy of life, and I rather think we will be able to extract a great deal
from this investigation. Come! We now understand one another."

Larcher grasped the hand held out to him, and gratefully accepted
the aid thus offered. From that moment the two dedicated
themselves to hunt down the criminal at whose hands George
Larcher had met his death. It was as strange a compact as had ever
been made. Halting Nemesis, who had rested all these years, once
more resumed her stealthy progress, and before her ran these two
young men, as ministers of her long-delayed revenge. This junction
of unforeseen circumstances savored of the dramatic.

"The first thing to be done," said Tait, when the compact was
thus concluded, "is to read both cases."
"Both cases!" repeated Claude curiously.

"Yes! You remember how Browning gives half a dozen aspects of


the same case in his 'Ring and the Book.' In a minor degree we
benefit in the same manner. There," said Tait, pointing to the roll of
newspapers, "is the case from the real point of view, and here, in
these three volumes, we will find the same case as considered in a
fictional fashion by the novelist. By reading both we may come to
some conclusion whence to start in our talk. Last night you read the
newspapers; I the novel. To-day we will reverse the process. I will
view the affair as set forth by the provincial press, and you will
devour the three volumes of John Parver as I did last night."

"And afterward?"

"Eh! Who can say?" replied Tait, shrugging his shoulders. Several
sojourns in Paris had left their trace in Gallic gestures, and possibly
in Gallic flippancy. "We must know what foundation we have before
we build."

Claude nodded. He was of the same way of thinking himself, and


commented on his friend's speech after his own fashion.

"Yes," said he a trifle vindictively, "we must build our gallows


stanch and strong. You can proceed with your toilet, and afterward
we will read novels and newspapers, as you suggest. The result of
our reading must appear in our actions. I rather think," he added
slowly, "that the result will be a visit to Mr. Hilliston."

"Without doubt. He was an eye-witness, and it is always


preferable to obtain evidence first hand."

"Then," said Claude reflectively, "there is Mrs. Bezel."

"Quite so! The enterprising lady who started the whole thing. Was
she also an eye-witness?"

"I can't say. Her name does not appear in the newspapers."
"Humph!" muttered Tait, scratching his chin. "Nor in those three
volumes can I find a character likely to develop into Mrs. Bezel of
Hampstead."

"I wonder who she can be," said Claude curiously, "or what she
can have to do with the case."

"That we must find out. Depend upon it, there is more in this
case than in newspapers or novel. We must find out all about Mrs.
Bezel, and," said Tait, with emphasis, "we must learn all that is to be
learned concerning John Parver."

"Who is John Parver?"

"Who was the Man in the Iron Mask?" replied Tait, in a bantering
tone. "I cannot say. But whomsoever he may be, he knows all about
this case."

"There is that possibility, certainly," assented the other smoothly,


"but I think it hardly likely. A man of to-day would not readily come
across the account of a tragedy occurring in a little known town
twenty-five years ago. Do you know," he added, after a pause, "that
it occurs to me that the publication of this book, containing an
account of the case, may have been the cause which incited Mrs.
Bezel to write the letter."

"I thought so myself. Mrs. Bezel may think that John Parver is a
nom de plume assumed by Claude Larcher."

"Or another alternative. Mrs. Bezel may be John Parver herself. It


is the fashion nowadays for women to write under the names of
men."

There was a few minutes' silence, during which each man was
intent on his own thoughts. Tait, whose brain turned quicker than
that of Larcher, was the first to break the silence.
"Well," said he, moving briskly toward his bedroom door, "before
we can say or do anything we must learn the facts of the case."

As he vanished into his room Claude laid his hand on the first of
the three volumes.
CHAPTER VII.
"LET SLEEPING DOGS LIE."

On the journey of life we sometimes come to a dead stop.


Obstacles arise which bar our further progress, and circumstances,
impossible to do away with, confront us on all sides. We cannot go
back, for in life there is no retrogression; we cannot proceed, owing
to blocked paths, and so stand hopeless and powerless, waiting for
the word or action of Fate. She, unseen but almighty deity, alone can
remove the hindrance which prevents our progress, and until she
speaks or acts, we can do nothing but wait. It is on such occasions
that we feel how truly we are the puppets of some unknown power.

Francis Hilliston had arrived at some such stoppage. Hitherto his


keen brain, his strong will, his capability for decisive action, had
carried him onward from past to present, through present to future.
When obstacles had arisen they had been easily swept away, and
with his own life in his hands, he was perfectly satisfied of his power
to mold it to his liking. Possibly Fate, who is a somewhat jealous
deity, felt angered at the egotistic self-reliance of the man; for
without warning she brought him to a dead stop, then grimly waited
to see how his boasted cunning would outwit her. As she probably
foresaw, the man did nothing but await her decision. It was the only
thing he could do.

For five-and-twenty years the Horriston tragedy had been


unmentioned, unthought of; Hilliston deemed that it was relegated
to the category of unknown crimes, and having in mind his
friendship for the parents, and his love for the son, was not unwilling
that it should be so. He did not wish Claude to know of the matter,
he was not desirous that he should come in contact with Mrs. Bezel;
and hitherto had managed so well that neither contingency had
eventuated. Congratulating himself on his dexterity, he remained
lulled in fancied security, when Fate, observant of his complacency,
sent a bolt from the blue, and brought him up short. Now, Hilliston,
forced by circumstances to tell the truth to Larcher, did not know
what to do. He could only wait for the fiat of the higher power.

Grimly satisfied that she had brought home his fault, and had
shown him his moral weakness, Fate made the next move, and sent
Larcher and his friend to Lincoln's Inn Fields to again set Hilliston on
his former journey. The paralysis of will which had seized the elder
man did not extend to the younger; for Claude arrived full of anxiety
to begin the search for the undiscovered criminal. The first result of
his compact with Tait was this visit to the lawyer.

"Claude Larcher; Spenser Tait," muttered Hilliston, glancing at the


cards brought in by his clerk. "I thought as much; the matter is out
of my hands now. Show the gentlemen in," he added sharply.

The clerk departed, and Hilliston walked quickly to the window,


where he stood biting his nails. All geniality had vanished from his
face; he looked older than his years, and an unaccustomed frown
wrinkled his expansive forehead. A crisis had come which he knew
not how to meet; so, after the fashion of men when they feel thus
helpless, he left the decision in the hands of Fate. Which was
precisely what Fate wanted.

"Good-morning, Claude! Good-morning, Mr. Tait!" said Hilliston,


welcoming the young men with artificial enthusiasm. "I expected to
see you today."

"Surely you did not expect to see me?" said Tait, in a silky tone,
as he placed his hat on the table.

"Indeed, I did! Where Damon is Phintias is sure to be. That


Claude's perusal of those papers would result in your accompanying
him to this office, I felt sure. I was right. Here you are!"
Mr. Hilliston affected a cheerfulness he was far from feeling. With
increasing age a distaste had come for violent excitements, and with
one of Claude's temperament he knew that the chances were that
the ensuing quarter of an hour would be somewhat stirring. Contrary
to his expectations, however, Larcher was eager, but calm, and
Hilliston, assuring himself that the calmness was genuine, began to
hope that the interview would pass off better than he expected. Still,
none of us like to reopen a disagreeable chapter of the book of life,
and this Mr. Hilliston, against his will and inclination, was about to
do.

"Well, sir," said Claude, when they were all seated, and the hush
of expectancy was in the air, "I have read those papers."

"Yes," said Mr. Hilliston interrogatively; "and what do you think of


the matter?"

"I think it is a very black case."

"You are quite right, Claude. It is a very black case indeed. I did
all in my power to bring the criminal to justice, but without success."

"Who is the criminal?" asked Larcher, with a keen glance at his


guardian.

Hilliston shuffled his feet uneasily, by no means relishing the


directness of the question.

"That is a difficult question to answer," he said slowly; "in fact an


impossible one. My suspicions point to Jeringham."

From this point Tait made a third in the conversation.

"That is because Jeringham disappeared on the night of the


murder," he said leisurely.

"Yes. I think that circumstance alone is very suspicious."


"He was never found again?"

"Never. We advertised in all the papers; we employed detectives,


inquired privately, but all to no result. The last person who saw
Jeringham was Mrs. Larcher. He parted from her at the door of The
Laurels, and vanished into the night. It still hides him."

"What do you conclude from that, sir?" asked Claude, after a


pause.

"I can only conclude one thing," replied Hilliston, with great
deliberation, "that your father, suspicious of Jeringham, returned on
that night from London, and saw the parting. The result is not
difficult to foresee. It is my own opinion that there were words
between the men, possibly a struggle, and that the matter ended in
the murder of your father by Jeringham. Hence the discovery of the
body thrown into the river, hence the flight of the murderer."

"Was this the generally received opinion at the time?"

"Yes. I can safely say that it was believed Jeringham was guilty,
and had fled to escape the consequences of his crime."

"In that case, how was it that Mrs. Larcher was arrested?" asked
Tait skeptically.

"You cannot have read the case carefully, to ask me that," replied
Hilliston sharply. "She was arrested on the evidence of the dagger.
Without doubt the crime was committed with the dagger, and as she
had worn it, the inference was drawn that she was the guilty person.
But she was acquitted, and left the court—as the saying is—without
a stain on her character."

"Nevertheless she died, Mr. Hilliston."

"Shame killed her," said the lawyer sadly. "She was a foolish
woman in many ways,—your pardon, Claude, for so speaking,—but
she was not the woman to commit so foul a crime. Indeed, I believe
she was fondly attached to her husband till Jeringham came
between them."

"Ah!" interposed Tait composedly, "that is John Parver's view."

"John Parver?" repeated Hilliston, with well-bred surprise. "I do


not know that name in connection with the case."

"Nor do we know the name of Mrs. Bezel," said Claude quickly.

Hilliston started, and looked at Claude as though he would read


his very soul. The inscrutability of the young man's countenance
baffled him, and he turned off the remark with a dry laugh.

"With Mrs. Bezel we will deal hereafter," he said shortly; "but who
is this John Parver!"

"He is the author of a book called 'A Whim of Fate.'"

"A novel?"

"Yes. A novel which embodies the whole of this case."

"That is strange," said Hilliston quietly, "but no doubt the author


has come across the details in some old provincial journal, and made
use of them. The Larcher affair caused a great deal of talk at the
time, but it is certainly remarkable that a novelist should have made
use of it for fictional purposes after the lapse of so many years. I
must read the book. Just note the name of it here, Mr. Tait, if you
please."

Tait did so, and Hilliston continued:

"Is my character in the book?"

"I think so. Under the name of Michael Dene!"

"I trust the author has been flattering to me. By the way, who
does he say committed the crime?"
"Michael Dene."

Hilliston went gray on the instant, as though a sudden blow had


been struck at his heart. Two pairs of keen eyes were fixed on his
face with some surprise, and uneasy at the scrutiny, he strove to
recover his composure.

"Upon my word," he said, with quivering lips, "I am infinitely


obliged to John Parver for describing me as a murderer. And what
motive does he ascribe to me, or rather to Michael Dene, for the
committal of the crime?"

"Love for the wife," said Tait, smiling.

"Eh! That is rather the rôle of Jeringham, I should say," replied


Hilliston, the color coming back to lips and cheek. "I must read this
novel, and if possible discover the identity of the author."

"Oh, we will do that!"

"Claude!" cried the lawyer, in astonishment.

"I and Tait. We intend to follow out this case to the end."

"It is useless! Five-and-twenty years have elapsed."

"Nevertheless, I am determined to hunt down the murderer of my


father," said Claude decisively. "Besides, we have two eye-witnesses
to the tragedy. Yourself and Mrs. Bezel."

"Ah! Mrs. Bezel! I forgot her. Certainly, I will do all in my power to


help you, Claude. Your father was my dearest friend, and I shall only
be too glad to avenge his fate. But if I could not do it at the
moment, how can I hope to do so now—after so long a period has
elapsed?"

"Leave that to us, sir. Tait and I will attend to the active part of
the business. All we ask you to do is to give us such information as
lies in your power."

"I will do that with pleasure," said Hilliston, who by this time was
thoroughly master of himself. "What is it you wish to know."

"We wish to know all about Mrs. Bezel. Who is she? What has she
to do with the case? Why is not her name mentioned in these
pages?"

"For answers to these questions you had better apply to the lady
herself. You have her address. Why not call on her?"

"I intend to do so to-morrow."

The old man rose from his seat, and took a turn up and down the
room. Then he paused beside Claude, and laid a trembling hand on
the young man's shoulder.

"I have been a good friend to you, Claude."

"You have been my second father—my real father," said Larcher


gently. "I shall never forget your kindness. I would return it if I
could."

"Then do so, by letting sleeping dogs lie."

"What do you mean by that, Mr. Hilliston?" asked the other, with a
subtle change in his tone.

"Abandon this case. Do not call on Mrs. Bezel. You can do no


good by reopening the affair. It was a mystery years ago, it is a
mystery still; it will remain a mystery till the end of time."

"Not if I can help it. I am sorry to disoblige you, sir, but my mind
is made up. I am determined to find out the truth."

Hilliston sighed, passed his hand across his forehead, and


returned to his seat, hopeless and baffled. He was sufficiently
acquainted with Claude's character to know that he was not easily
turned from his purpose, and that his resolution to solve the mystery
would be resolutely carried out. Yet he made one more attempt to
bend the young man to his will.

"If you are wise you will not call on Mrs. Bezel."

"Why not, sir?"

"It will give you great pain."

"All my pain is past," replied Claude quickly. "I can suffer no more
than I did when reading these papers. I must call on Mrs. Bezel; I
must know the truth, and," added he significantly, "I have your
promise to assist me."

"I will do all in my power," answered Hilliston wearily, "but you do


not know what are you doing. I am older and more experienced
than you, and I give you my best advice. Do not see Mrs. Bezel, and
leave the Larcher affair alone."

The result of this well-meant advice was that Claude called the
next morning on Mrs. Bezel.
CHAPTER VIII.
BOTH SIDES OF THE QUESTION.

Man's life has frequently been compared to a river. In childhood it


is a trickling thread, in youth a stream, in manhood a majestic river,
and finally in old age is swallowed up in the ocean of death. A very
pretty parable, but somewhat stale. It is time that life was indicated
by a new metaphor. Let us therefore compare the life of man to the
ocean itself. Like the ocean life has its calms and storms, its sullen
rages, its caressing moments; and like the ocean—for this is the
main point of the illustration—it has its profound depths, containing
a hundred secrets unknown to the outer world. Francis Hilliston was
like the ocean: all knew the surface, few were acquainted with the
depths below.

A man who leads a double life need never feel dull. He may be
nervous, anxious, fearful lest his secret should be discovered, but
the constant vigilance required to hide it preserves him from the
curse of ennui. He ever keeps the best side of his nature uppermost;
his smiles are for the world, his brow is smoothed to lull suspicion.
But to continue the simile of the ocean: in the depths lie many
terrible things which never come to the surface; things which he
scarcely dare admit even to himself. Francis Hilliston was one of
these men.

Everyone knew Hilliston of Lincoln's Inn Fields, or thought they


did, which is quite a different thing. He was widely respected in the
profession; he was popular in society; hand and glove with
prominent and wealthy personages. His house at Kensington Gore
was richly furnished; his wife was handsome and fashionable; he
gave splendid entertainments, at which none was more jocund than
the host himself; he was, outwardly, all that was prosperous and
popular. In his professional capacity he was the repository of a
thousand secrets, but of all these none was more terrible than the
one locked up in his own breast.

Long years of training, constant necessity, had taught him how to


control his emotions, to turn his face into a mask of inscrutability;
yet he succeeded ill at times, as witness his interview with the two
young men. Not all his powers of self-repression could keep his face
from turning gray; nor prevent the perspiration beading his brow;
nor steady his voice to well-bred indifference. Usually he succeeded
in masking his emotion; this time he had failed, and, worst of all, he
knew that he had failed.

It was not Claude that he feared, for the young man was not of a
suspicious nature; and even had he been so, would certainly have
scoffed at the idea of attributing any evil to the one who had been
to him a father. Tait, silent, observant, and cynical, was the person
to be dreaded. Accustomed by his profession to read faces, Hilliston
had seen that the quiet little man was possessed of one of those
inquisitive penetrative natures, which suspect all men, and from a
look, a gesture, a pause, can draw evidence to support any suspicion
they may entertain.

Certainly Tait had no reason to distrust Hilliston when he entered


the room, but during the interview he appeared dissatisfied with the
lawyer's manner. That Hilliston should attempt to dissuade Claude
from prosecuting a search for his father's murderer seemed strange;
but that he should betray such marked agitation at the idea of such
searching taking place was stranger still. Altogether Tait left the
office in a very dissatisfied state of mind. Hilliston had sufficient
penetration to note this, and when left alone was at his wit's end
how to baffle the unwarrantable curiosity of this intruder.

"I don't mind Claude," he said, pacing up and down the room, "he
has not sufficient brain power to find out anything. I do not want
him to know. But this Tait is dangerous. He is one of those dogged
creatures, who puts his nose to the scent, and never leaves the trail
till the prey is captured. It is with him I have to deal, not with
Claude."

His agitation almost mastered him, and he hurriedly took a small


bottle from a drawer in his desk. Dropping the contents of this into a
glass of water, he drank off the draught, and in a short space of time
regained his composure, in some measure. Then he sat down to
think, and plot, and plan how to baffle the vigilance of Tait.

"That infernal woman has done it all," he muttered savagely; "she


has lighted the fire. Let us see how she will put it out. But she
cannot put it out," he added, striking his forehead with his clenched
fist; "it will blaze and burn. I shall burn with it unless——"

There was a strange smile on his lips, as an idea entered his


mind, and he glanced quickly at his watch.

"Four o'clock. Claude can't possibly call on Margaret to-day, so I


have yet time to prepare her for his visit. I must silence her at any
cost. She must hold her tongue or ruin us both. Great Heavens! to
think that she should break out like this after five-and-twenty years.
It is enough to drive me mad."

By this time he had put on his gloves, and stretched his hand
toward his hat, which stood on a side table. A glance in the glass
showed him how old and gray he looked, and the sight was so
unexpected that he started in dismay.

"Bah! I look as though I were going to fail," he said to himself,


"but I must not fail. I dare not fail. At sixty, rich, honored, respected,
I am not going to fall from the pedestal I have reached. I shall
reassure Claude. I shall baffle Tait. I shall silence Margaret. The first
move in the game is mine."

Calm, dignified, easy, he left his office, and stepped into the
brougham waiting at the door. To judge by appearance, one would
have thought him the most respectable and upright man in London.
No one knew what lurked behind that benevolent expression. His
mask had fallen for the moment when Tait was present; now it was
on again, and he went forth to deceive the world. Yet he had an
uneasy consciousness that one man at least guessed his real
character.

"Never mind," he thought, as the footman closed the door of the


brougham, "it will be strange if, with my age and experience and
reputation and money, I cannot baffle him."

He did not go direct home, as it was yet early, and he had one or
two things to do in connection with his new task. First he drove to
Tait's chambers, and ascertained from the porter that the two young
men were within.

"Never mind sending up my name, I won't disturb them," he said,


when the porter requested his card. "I only wished to speak to Mr.
Tait about a box at the theater."

"If it is the Lyceum you mean, sir, I have just got two stalls for Mr.
Tait."

"Ah! I may see them there," replied Hilliston negligently; and as


he drove away reflected: "Good! They have not yet been to
Hampstead; nor do they intend to go to-night. Mr. Tait has yet to
learn the value of time."

Driving through Piccadilly he stopped at a bookshop, and with


some difficulty, for the demand was large, obtained a copy of "A
Whim of Fate." He began to read it in the brougham, and skimmed
its pages so rapidly that by the time he reached Kensington Gore he
had nearly finished the first volume. He did not recognize himself in
the character of Michael Dene, and became more convinced than
ever that the coincidence of the Larcher affair forming the plot of a
novel, was due to the author's reading the case in some old
provincial newspaper. On every page it betrayed that, to him, the
story was hearsay.

Fortunately Mrs. Hilliston was driving in the Park, so the lawyer


shut himself up in his library, and went on reading the story. He did
not see his wife till dinner, which took place at eight o'clock, and
then descended in his ordinary clothes, looking ill and pale.
Something he had read in the novel had startled him more than he
cared to confess—even to himself.

"You must excuse my dress, Louise," he said, on taking his seat,


"but I have been so engrossed with a novel that I did not hear the
dressing bell."

"It has not had a pleasant effect on you," replied his wife, smiling;
"you do not look at all well."

"I am not well," said Hilliston, who merely trifled with his food;
"you must excuse me going with you to the Lamberts' to-night, as I
think I shall call in and see my doctor."

"Are you so bad as all that?" questioned Mrs. Hilliston anxiously.


"Why not send for Dr. Bland?"

"I prefer going to see him, Louise. You will probably not be back
till three in the morning, so I will go to bed immediately on my
return. Have no fear, my dear, it is only a trifling indisposition."

After these plain statements it was rather strange that Hilliston, in


place of driving to Dr. Bland's, who lived in Hill Street, should direct
the cab, which he picked up by the Park railings, to drive to
Hampstead.
CHAPTER IX.
MRS. BEZEL.

One cannot always judge by appearances either as regards human


beings or houses. Mr. Hilliston was one excellent illustration of this
rule; Clarence Cottage was another. It was in a narrow and crooked
lane trending downward to the right, at the summit of Fitzjohn's
Avenue; an unpretentious two-story building, divided from the public
thoroughfare by a well-cultivated garden. Therein grew thyme and
lavender, marigolds and pansies; for the owner of the cottage loved
those homely flowers, and daily gazed at them from the bow-
window wherein her couch was placed.

Mrs. Bezel never walked in her garden, for the all-sufficient


reason that she was a helpless paralytic, and had not used her limbs
for over ten years. Still a moderately young woman of forty-five, she
possessed the remains of great beauty, ravaged by years of anxiety
and mental trouble. Those passing along the lane usually saw her
pale face at the window, and pitied the sufferings written in every
line; sufferings which were apparent even to a casual glance. Noting
the homely garden, the mean-looking dwelling, the anxious
expression of the invalid, they deemed her to be some poor sickly
creature, the scapegoat of nature and the world, who had sought
this secluded spot in order to hide her troubles. This view was not
entirely correct.

She was in ill-health, it is true; she dwelt in a small house


certainly; and the anxious expression was seldom absent from her
face. But she was in easy circumstances, untroubled by pecuniary
worries, and the interior of the cottage was furnished with a
magnificence more suggestive of Park Lane than of Hampstead. The
outward aspect of the house, like that of Mr. Hilliston, was a lie.
Her sitting room resembled the boudoir of some Mayfair beauty.
The curtains were of silk, the carpet velvet pile, the walls were
adorned with costly pictures, and every corner of the small
apartment was filled with sumptuous furniture. All that art could
contribute, all that affection could suggest, were confined in the tiny
space, and had Mrs. Bezel possessed the mines of Golconda she
could not have been more luxuriously lodged. The house was a gem
of its kind, perfect and splendid.

Mrs. Bezel took little interest in these material comforts. Her life
was passed between a couch in the bow-window, a well-cushioned
chair by the fire, and a downy bed in the next room. She had little
appetite and did not enjoy her food; mental anxiety prevented her
interesting herself in the splendors around her; and the only
pleasure she took was her dreary journey in a Bath-chair when the
weather permitted. Then, as she inhaled the fresh breeze blowing
across the Heath, she gazed with longing eyes at London, almost
hidden under its foggy veil, far below, and always returned with
reluctance to the familiar splendors of her narrow dwelling. Fortune
had given her much, but by way of compensation had deprived her
of the two things she most desired—of health and of love.

Even on this warm June evening a fire burned in the grate, for
Mrs. Bezel was a chilly creature, who shrunk at the least breath of
wind. According to custom, she had left the window couch at seven
o'clock, and had taken her simple meal while seated in her large
chair to the right of the fireplace. After dinner she took up a novel
which was placed on a small table at her elbow, and tried to read;
but her attention was not fixed on the book, and gradually it fell
from her hands, while she gazed idly at the fire.

What she saw therein Heaven only knows. We all have our
moments of retrospection, and can picture the past in the burning
coals. Some even picture the future, but there was none for this
woman. She was old, weary, diseased, worn-out, and therefore saw
in the fire only the shadows of past years. Faces looked out of the
flaming valleys, scenes arranged themselves in the red confusion;
but among them all there was always one face, one scene, which
never vanished as did the others. This special face, this particular
scene, were fixed, immovable, cruel, and insistent.

The chime of the clock striking half-past nine roused her from her
reverie, and she again addressed herself to the novel with a sigh.
Tortured by her own thoughts, Mrs. Bezel was not accustomed to
retire before midnight, and there were nearly three hours to be got
through before that time. Her life was as dreary, and weary, and
heart-breaking as that of Mariana in the Moated Grange.

The tread of a firm footfall in the distance roused her attention,


and she looked expectantly toward the door, which faced her chair.
The newcomer passed up the narrow garden path, entered the
house, and, after a pause in the hall, presented himself in the sitting
room. Mrs. Bezel knew who it was before the door opened; for
standing on the threshold was the man with the face she had lately
pictured amid the burning coals. Francis Hilliston and the woman
who called herself Mrs. Bezel looked steadily at one another, but no
sign of welcome passed between them. He was the first to break the
awkward silence.

"How are you this evening, Margaret?" he asked, advancing


toward her; "better, I hope. There is more color in your cheeks,
more brightness in your eyes."

"I am the same as ever," she replied coldly, while he drew a chair
close to the fire, and stretched out his hands to the blaze. "Why
have you come here at this hour?"

"To see you."

"No doubt! But with what purpose?"

Hilliston pinched his nether lip between finger and thumb,


frowning the while at the fire. Whatever had been, there was now
no love between this woman and himself. But on no occasion had he
noted so hostile a tone in her voice. He was aware that a duel of
words and brains was about to ensue, and, knowing his antagonist,
he took the button off his foil. There was no need for fine speaking
or veiled hints in this conversation. It was advisable that all should
be plain and straightforward, for they knew each other too well to
wear their masks when alone. Under these circumstances he spoke
the truth.

"I think you can guess my errand," he said suavely. "It concerns
the letter you wrote to Claude Larcher."

"I thought as much! And what more have you to say in


connection with that affair?"

"I have merely to inform you that the man whom you desire to
see is in London, and will no doubt answer your kind invitation in
person."

Mrs. Bezel stretched out her hand and selected a letter from the
little pile on her table.

"If you will look at that," she said coldly, "you will see that Claude
intends to call on me at three o'clock to-morrow."

Taking the letter in silence, Hilliston turned frightfully pale, and


the perspiration stood in large beads on his forehead. He expected
some such appointment to be made, yet the evidence in his hand
startled him all the same. The promptitude of action spoke volumes
to one of his acute perceptions. To defend his good name would
require all his skill and experience, for he had to do with men of
action, who acted as quickly as they thought. The duel would be
more equal than he had thought.

"Are you still determined to tell all," he said in a low tone,


crushing the paper up in his hand.
"Yes."

The monosyllable was uttered in so icy a manner that Hilliston


lost his temper completely. Before this woman there was no need for
him to retain his smiling mask, and in a frenzy of rage he hurried
into rapid speech, frantic and unconsidered.

"Ah, you would ruin me!" he cried, springing to his feet; "you
would drag up those follies of '66, and make London too hot to hold
me! Have I not implored, threatened, beseeched, commanded—
done everything in my power to make you hold your peace?
Miserable woman, would you drag the man you love down to——"

"The man I loved you mean," responded Mrs. Bezel, in nowise


moved by this torrent of abuse. "Pray do not be theatrical, Francis.
You know me well enough to be aware that when my mind is made
up I am not easily moved. A man of your brains," she added
scornfully, "should know that loss of temper is but the prelude to
defeat."

Recognizing the truth of this remark, Hilliston resumed his seat,


and subdued his anger. Only the look of hatred in his eyes betrayed
his real feelings; otherwise he was calm, suave, and self-controlled.

"Have you weighed the cost of your action?" he demanded


quietly.

"Yes. It means ruin to us both. But the loss is yours, not mine.
Helpless and deserted, life has no further charms for me, but you,
Mr. Hilliston, doubtless feel differently."

"Margaret," he said entreatingly, "why do you speak like this?


What harm have I done you that——"

"What harm!" she interrupted fiercely. "Have you not ruined me,
have you not deserted me, have you not robbed me of all that I
loved? My life has been one long agony, and you are to blame for it
all. Not a word," she continued imperiously. "I shall speak. I insist
upon your knowing the truth!"

"Go on," he said sullenly; "I listen."

"I loved you once, Francis. I loved you to my own cost. For your
sake I lost everything—position, home, respect, and love. And you—
what did you do?"

Hilliston looked round the room, and shrugged his shoulders.


Look and gesture were so eloquent that she commented on them at
once.

"Do you think I valued this splendor? I know well enough that you
gave me all material comforts. But I wanted more than this. I
wanted love."

"You had it."

"Aye! I had the passion such as you call love. Did it endure? You
know well that it did not. So long as I was healthy and handsome
and bright your attentions continued, but when I was reduced to this
state, ten years ago, what did you do? Left me to marry another
woman."

"It was not my fault," he muttered uneasily; "my affairs were


involved, and, as my wife had money, I was forced to marry her."

"And you did marry her, and no doubt neglect her as you do me.
Is Mrs. Hilliston any happier in her splendid house at Kensington
Gore than I in this miserable cottage? I think not. I waited and
waited, hoping your love would return. It did not; so I took my own
course—revenge!"

"And so wrote to Claude Larcher!"

"Yes. Listen to me. I wrote the first letter on the impulse of the
moment. I had been reading a book called 'A Whim of Fate,' which
contained——"

"I know! I know! I read it myself this evening."

"Then you know that someone else is possessed of your secret.


Who is John Parver?"

"I don't know. I intend to find out. Meanwhile I am waiting to


hear the conclusion of your story."

Mrs. Bezel drew a long breath, and continued:

"The book, which contained an account of the tragedy at


Horriston, brought the fact so visibly before me that I wrote on the
impulse telling you that I wished to see Claude, and reveal all. You
came and implored and threatened. Then my impulse became a
fixed determination. I saw how I could punish you for your neglect,
and so persisted in my scheme. I wrote to Claude, and he is coming
here to-morrow."

"What do you intend to tell him?"

"So much of the death of his father as I know."

"You must not—you dare not," said Hilliston, with dry lips. "It
means ruin!"

"To you, not to me."

"Impossible," he said curtly. "Our relations are too close for one to
fall without the other."

"So you think," rejoined Mrs. Bezel coolly; "but I know how to
protect myself. And of one thing you may be assured, I will say
nothing against you. All I intend to do is to tell him of his father's
death."

"He knows it already."


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!

ebookname.com

You might also like