Programming Clojure Alex Miller download
Programming Clojure Alex Miller download
https://textbookfull.com/product/programming-clojure-alex-miller/
https://textbookfull.com/product/quick-clojure-effective-
functional-programming-mark-mcdonnell/
https://textbookfull.com/product/quick-clojure-effective-
functional-programming-1st-edition-mark-mcdonnell/
https://textbookfull.com/product/learning-c-programming-with-
unity-3d-alex-okita/
https://textbookfull.com/product/clojure-in-action-2nd-edition-
amit-rathore/
Clojure in Action Second Edition Amit Rathore & Francis
Avila
https://textbookfull.com/product/clojure-in-action-second-
edition-amit-rathore-francis-avila/
https://textbookfull.com/product/reactive-programming-with-
kotlin-first-edition-learn-rx-with-rxjava-rxkotlin-and-rxandroid-
alex-sullivan/
https://textbookfull.com/product/web-development-with-
clojure-3rd-edition-dmitri-sotnikov-scot-brown/
https://textbookfull.com/product/precalculus-julie-miller/
https://textbookfull.com/product/a-postcard-from-paris-
postcard-2-1st-edition-alex-brown-brown-alex/
Programming Clojure, Third
Edition
by Alex Miller, with Stuart Halloway, and Aaron Bedra
Many of the designations used by manufacturers and sellers to distinguish their products are
claimed as trademarks. Where those designations appear in this book, and The Pragmatic
Programmers, LLC was aware of a trademark claim, the designations have been printed in
initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic
Programmer, Pragmatic Programming, Pragmatic Bookshelf and the linking g device are
trademarks of The Pragmatic Programmers, LLC.
Every precaution was taken in the preparation of this book. However, the publisher assumes
no responsibility for errors or omissions, or for damages that may result from the use of
information (including program listings) contained herein.
Our Pragmatic courses, workshops, and other products can help you and your team create
better software and have more fun. For more information, as well as the latest Pragmatic
titles, please visit us at http://pragprog.com.
Our ebooks do not contain any Digital Restrictions Management, and have always been
DRM-free. We pioneered the beta book concept, where you can purchase and read a book
while it’s still being written, and provide feedback to the author to help make a better book
for everyone. Free resources for all purchasers include source code downloads (if
applicable), errata and discussion forums, all available on the book's home page at
pragprog.com. We’re here to make your life easier.
Andy Hunt
The Pragmatic Programmers
The team that produced this book includes: Andy Hunt (Publisher),
Janet Furlow (VP of Operations), Brian MacDonald (Managing Editor),
Jacquelyn Carter (Supervising Editor), Paula Robertson (Copy Editor),
Potomac Indexing, LLC (Indexing), Gilson Graphics (Layout)
Acknowledgments
Introduction
Who This Book Is For
What’s in This Book
How to Read This Book
Notation Conventions
Web Resources and Feedback
Downloading Sample Code
1. Getting Started
Simplicity and Power in Action
Clojure Coding Quick Start
Navigating Clojure Libraries
Wrapping Up
2. Exploring Clojure
Reading Clojure
Functions
Vars, Bindings, and Namespaces
Metadata
Calling Java
Comments
Flow Control
Where’s My for Loop?
Wrapping Up
4. Functional Programming
Functional Programming Concepts
How to Be Lazy
Lazier Than Lazy
Recursion Revisited
Eager Transformations
Wrapping Up
5. Specifications
Defining Specs
Validating Data
Validating Functions
Generative Function Testing
Wrapping Up
8. Macros
When to Use Macros
Writing a Control Flow Macro
Making Macros Simpler
Taxonomy of Macros
Wrapping Up
9. Multimethods
Living Without Multimethods
Defining Multimethods
Moving Beyond Simple Dispatch
Creating Ad Hoc Taxonomies
When Should I Use Multimethods?
Wrapping Up
Bibliography
→ Nola Stowe
CTO/Founder, Ruby Geek LLC
If you are interested in learning the ins and outs of the Clojure language, Programming
Clojure will provide you with a valuable resource. The book not only covers the basics
of the language, but also builds on the basics to allow readers to understand and apply
more advanced concepts like spec and macros.
→ Joy Clark
Consultant, innoQ Deutschland GmbH
This book is very effective at teaching Clojure’s unique take on functional
programming and data manipulation. It explains concepts clearly and covers the
mechanics of nearly every part of the language, with helpful commentary that goes
beyond the code.
→ Ghadi Shayban
Engineer, healthfinch
The third edition of Programming Clojure is an excellent resource for new and old
Clojure programmers. It provides a thorough account of the language’s rationale and
features, including approachable explanations of more recent features like transducers
and spec.
→ Michael Fogleman
Developer
Acknowledgments
Many people have contributed to what is good in this book. The problems and errors
that remain are ours alone.
Thanks to Rich Hickey for creating the excellent Clojure language and fostering a
community around it. Thanks to the awesome team at Cognitect (formerly Relevance)
for creating an atmosphere in which good ideas can grow and thrive. Thanks to the
Clojure community for using Clojure and turning an idea into a working ecosystem.
Thanks to all the readers and technical reviewers who have suggested improvements
across all three editions of the book. Jeff Brown suggested the coin toss problem in
Lazier Than Lazy. David Liebke wrote the original content for Chapter 7, Protocols
and Datatypes.
Thanks to my wife and family for their love, support, and the precious gift of time to
create.—Alex
Thanks to my wife, Joey, and to my children, Hattie, Harper, Mabel Faire, and
Truman. You all make the sun rise.—Stuart
Clojure is elegant. Clojure’s clean, careful design lets you write programs that get
right to the essence of a problem, without a lot of clutter and ceremony.
Clojure is Lisp reloaded. Clojure has the power inherent in Lisp but is not
constrained by the history of Lisp.
Clojure embraces Java. Calling from Clojure to Java is direct and fast, with no
translation layer.
Many other languages cover some of the features described in the previous list. Of all
these languages, Clojure stands out. The individual features listed earlier are powerful
and interesting. Their clean synergy in Clojure is compelling. We will cover all these
features and more in Chapter 1, Getting Started.
Who This Book Is For
Clojure is a powerful, general-purpose programming language. As such, this book is
for programmers with experience in a programming language like Java, C#, Python, or
Ruby, but new to Clojure and looking for a powerful, elegant language.
Clojure is built on top of the Java Virtual Machine, and it is fast. This book will be of
particular interest to Java programmers who want the expressiveness of a dynamic
language without compromising on performance.
Clojure is part of a larger phenomenon. Languages such as Erlang, F#, Haskell, and
Scala have garnered attention recently for their support of functional programming or
their concurrency model. Enthusiasts of these languages will find much common
ground with Clojure.
What’s in This Book
Chapter 1, Getting Started demonstrates Clojure’s elegance as a general-purpose
language, plus the functional style and concurrency model that make Clojure unique. It
also walks you through installing Clojure and developing code interactively at the
REPL.
The next two chapters cover functional programming. Chapter 3, Unifying Data with
Sequences shows how all data can be unified under the powerful sequence metaphor.
Chapter 4, Functional Programming shows you how to write functional code in the
same style used by the sequence library.
Chapter 6, State and Concurrency delves into Clojure’s concurrency model. Clojure
provides four powerful models for dealing with concurrency, plus all of the goodness
of Java’s concurrency libraries.
Chapter 7, Protocols and Datatypes walks through records, types, and protocols in
Clojure. These concepts were introduced in Clojure 1.2.0 and enhanced in 1.3.0.
Chapter 8, Macros shows off Lisp’s signature feature. Macros take advantage of the
fact that Clojure code is data to provide metaprogramming abilities that are difficult or
impossible in anything but a Lisp.
Chapter 10, Java Interop shows you how to call Java from Clojure and call Clojure
from Java. You’ll see how to take Clojure straight to the metal and get Java-level
performance.
Finally, Chapter 11, Building an Application provides a view into a complete Clojure
workflow. You will build an application from scratch, working through solving the
various parts to a problem and thinking about simplicity and quality.
How to Read This Book
All readers should begin by reading the first two chapters in order. Pay particular
attention to Simplicity and Power in Action, which provides an overview of Clojure’s
advantages.
After you read the first two chapters, skip around as you like. But read Chapter 3,
Unifying Data with Sequences before you read Chapter 6, State and Concurrency.
These chapters lead you from Clojure’s immutable data structures to a powerful model
for writing correct concurrency programs.
As you make the move to longer code examples in later chapters, make sure you use
an editor that provides Clojure indentation for you. If you can, try to use an editor that
supports parentheses balancing, such as Emacs’ paredit mode or the Cursive plugin for
IntelliJ. This feature will be a huge help as you’re learning to program in Clojure.
Read Chapter 2, Exploring Clojure carefully. Clojure has very little syntax
(compared to Java or C#), and we cover the ground rules fairly quickly.
Pay close attention to macros in Chapter 8, Macros. These are the most alien part
of Clojure when viewed from a Java or C# perspective.
If you like Emacs, get a mode for Clojure that makes you happy before working
through the code examples in later chapters. There are many options, but consider
inf-clojure for a minimalist setup and CIDER for a full-feature environment.
(+ 2 2)
(+ 2 2)
-> 4
Where console output cannot easily be distinguished from code and results, it’s
preceded by a pipe character (|).
(println "hello")
| hello
-> nil
When introducing a Clojure form for the first time, we’ll show the grammar for the
form like this:
(example-fn required-arg)
(example-fn optional-arg?)
(example-fn zero-or-more-arg*)
(example-fn one-or-more-arg+)
(example-fn & collection-of-variable-args)
Clojure code is organized into libs (libraries). Where examples in the book depend on
a library that’s not part of the Clojure core, we document that dependency with a
require form:
The require form has several options. The :refer option can be used to make either
specific vars (or all vars with :all) available in the current namespace. The :alias option
can be used to create an alias for references to the library. For example, a commonly
used function is file, from the clojure.java.io library:
(require '[clojure.java.io :as io])
(io/file "hello.txt")
-> #<File hello.txt>
Clojure returns nil from a successful call to require. For brevity, this is omitted from
the example listings.
While reading the book, you’ll enter code in an interactive environment called the
REPL. The REPL prompt looks like this:
user=>
The user in the prompt indicates the namespace you’re currently working in. For most
of the examples, the current namespace is irrelevant. Where the namespace is
irrelevant, we use the following syntax for interaction with the REPL:
The Programming Clojure home page[4] links to the official copy of the source
code and is updated to match each release of the book.
Throughout the book, listings begin with their filename, set apart from the actual code
by a gray background. For example, the following listing comes from
src/examples/preface.clj:
src/examples/preface.clj
(println "hello")
If you’re reading the book in PDF form, you can click the little gray box preceding a
code listing to download that listing directly. With the sample code in hand, you are
ready to get started. We’ll begin by meeting the combination of features that make
Clojure unique.
Footnotes
[1] https://www.pragprog.com/titles/shcloj3/programming-clojure
[2] https://www.pragprog.com/titles/shcloj3/errata
[3] http://forums.pragprog.com/forums/439
[4] http://www.pragprog.com/titles/shcloj3
Getting Started
Clojure is a functional programming language on the JVM with great support for
managing state and concurrency. Two key concepts drive everything in Clojure:
simplicity and power.
Simplicity has several meanings that are relevant in software, but the definition we care
about is the original one: a thing is simple if it is not compound. Simple components
allow systems to do what their designers intend, without also doing other things
irrelevant to the task at hand.
Power also has many meanings. The one we care about is whether the capabilities are
adequate for the tasks we want to undertake. To feel powerful as a programmer, you
need to build on a platform that’s itself capable and widely deployed, such as the JVM.
Then, your tools must give you full, unrestricted access to that power. Power is often
an essential requirement for projects that must get the most out of their platform.
As programmers, we’ve spent years choosing between power and simplicity in our
tools. Some trade-offs are fundamental, but power vs. simplicity is not one of them.
Clojure shows that they can instead go hand in hand.
We’re going to start by diving into some examples to see how Clojure differentiates
itself from other languages. Then, one of the ways Clojure puts simple and powerful
tools in your hands is by encouraging interactive development with the REPL. We’ll
see how to work efficiently at the REPL and also how to use the REPL to explore the
environment and other libraries.
Simplicity and Power in Action
All of the distinctive features in Clojure are there to provide simplicity, power, or both.
Some of these features include concise and expressive programs, the power of Lisp
updated with a modern syntax, an immutable-first approach to state and concurrency,
and an embrace of the JVM host and its ecosystem. Let’s look at a few examples that
demonstrate these high-level features.
Clojure Is Elegant
Clojure is high signal, low noise. As a result, Clojure programs are short programs.
Short programs are cheaper to build, cheaper to deploy, and cheaper to maintain. This
is particularly true when the programs are concise rather than merely terse. As an
example, consider the following Java code, from Apache Commons:[5]
data/snippets/isBlank.java
The isBlank method checks to see whether a string is blank: either empty or consisting
of only whitespace. Here is a similar implementation in Clojure:
src/examples/introduction.clj
The Clojure version is shorter. But even more important, it’s simpler: it has no
variables, no mutable state, and no branches. This is possible thanks to higher-order
functions. A higher-order function is a function that takes functions as arguments
and/or returns functions as results. The every? function takes a function and a
collection as its arguments and returns true if that function returns true for every item
in the collection. Note that this definition also works correctly for special cases like
null and the empty string without requiring explicit checks.
Because the Clojure version has no branches, it’s easier to read and test. These benefits
are magnified in larger programs. Also, while the code is concise, it’s still readable. In
fact, the Clojure program reads like a definition of blank: a string is blank if every
character in it is whitespace. This is much better than the Commons method, which
hides the definition of blank behind the implementation detail of loops and if
statements.
data/snippets/Person.java
Other than being an order of magnitude shorter, the Clojure approach differs in that a
Clojure Person is immutable. Immutable data structures are inherently thread safe, and
update capabilities can be layered when using Clojure’s references, agents, and atoms,
which are covered in Chapter 6, State and Concurrency. Because records are
immutable, Clojure also provides correct implementations of hashCode and equals
automatically.
Clojure has a lot of elegance baked in, but if you find something missing, you can add
it yourself, thanks to the power of Lisp.
In this code, getFirstName is a method. Methods are polymorphic and give the
programmer control over meaning, but the interpretation of every other word in the
example is fixed by the language. Sometimes you really need to change what these
words mean. So, for example, you might do the following:
Redefine private to mean “private for production code but public for serialization
and unit tests.”
Redefine class to automatically generate getters and setters for private fields,
unless otherwise directed.
Create a subclass of class that provides callback hooks for life-cycle events. For
example, a life-cycle--aware class could fire an event whenever an instance of the
class is created.
These kinds of needs are commonplace. In most languages, you would have to petition
the language implementer to add the kinds of features mentioned here. In Clojure, you
can add your own language features with macros (Chapter 8, Macros). Clojure itself is
built out of macros such as defrecord:
If you need different semantics, write your own macro. If you want a variant of records
with strong typing and configurable nil-checking for all fields, you can create your
own defrecord macro, to be used like this:
This ability to reprogram the language from within the language is the unique
advantage of Lisp. You will see facets of this idea described in various ways:
Lisp is homoiconic.[6] That is, Lisp code is just Lisp data. This makes it easy for
programs to write other programs.
The whole language is there, all the time. Paul Graham’s essay “Revenge of the
Nerds”[7] explains why this is so powerful.
The downside of Lisp’s simple, regular syntax, at least for beginners, is the prevalence
of parentheses and lists as the core datatype. Clojure offers a combination of features
that make Lisp more approachable:
Clojure generalizes Lisp’s physical list into an abstraction called a sequence. This
preserves the power of lists, while extending that power to a variety of other data
structures, including ones you make yourself.
Many Clojure programmers will be new to Lisp, and they’ve probably heard bad
things about all those parentheses. Clojure keeps the parentheses (and the power of
Lisp!) but improves on traditional Lisp syntax in several ways:
Clojure provides a convenient literal syntax for a wide variety of data structures
besides just lists: regular expressions, maps, sets, vectors, and metadata. These
features make Clojure code less “listy” than most Lisps. For example, function
parameters are specified in a vector [] instead of a list ().
src/examples/introduction.clj
The vector makes the argument list jump out visually and makes Clojure function
definitions easy to read.
Idiomatic Clojure does not nest parentheses more than necessary. Consider the
cond macro, present in both Common Lisp and Clojure. cond evaluates a set of
test/result pairs, returning the first result for which a test form yields true. Each
test/result pair is grouped with parentheses:
; Clojure cond
(cond (= x 10) " equal"
(> x 10) " more")
This is an aesthetic decision, and both approaches have their supporters. The
important thing is that Clojure takes the opportunity to improve on Lisp traditions
when it can do so without compromising Lisp’s power.
Clojure is an excellent Lisp, for both Lisp experts and Lisp beginners.
Functions are first-class objects. That is, functions can be created at runtime,
passed around, returned, and in general, used like any other datatype.
Data is immutable.
For many tasks, functional programs are easier to understand, less error prone, and
much easier to reuse. For example, the following short program searches a database of
compositions for every composer who has written a composition named “Requiem”:
The name for does not introduce a loop but a list comprehension. Read the earlier code
as, “For each c in compositions, where the name of c is "Requiem", yield the
composer of c.” List comprehension is covered more fully in Transforming Sequences.
People have known about the advantages of functional languages for a while now. And
yet, pure functional languages like Haskell have not taken over the world, because
developers find that not everything fits easily into the pure functional view.
There are four reasons that Clojure can attract more interest now than functional
languages have in the past:
Purely functional languages can make it awkward to model state that really needs
to change. Clojure provides a structured mechanism for working with changeable
state via software transactional memory and refs (here), agents (here), atoms
(here), and dynamic binding (here).
Many functional languages are statically typed. Clojure’s dynamic typing makes
it more accessible for programmers learning FP. However, Clojure provides specs
to describe your data and functions, for use as you need it, with greater
expressivity than most static type systems.
Clojure’s Java invocation approach is not functional. When you call Java, you
enter the familiar, mutable world. This offers a comfortable haven for beginners
learning functional programming and a pragmatic alternative to functional style
when you need it. Java invocation is covered in Chapter 10, Java Interop.
Clojure’s approach to changing state enables concurrency without explicit locking and
complements Clojure’s functional core.
For example, the following code creates a working, thread-safe, in-memory database
of accounts:
The ref function creates a transactionally protected reference to the current state of the
database. Updating is trivial. This code adds a new account to the database:
(dosync
(alter accounts conj (->Account "CLJ" 1000.00)))
The dosync causes the update to accounts to execute inside a transaction. This
guarantees thread safety, and it’s easier to use than locking. With transactions, you
never have to worry about which objects to lock or in what order. The transactional
approach will also perform better under some common usage scenarios, because
readers will never block, for example.
Although the example here is trivial, the technique is general, and it works on real-
world problems. See Chapter 6, State and Concurrency for more on concurrency and
STM in Clojure.
(System/getProperties)
-> {java.runtime.name=Java(TM) SE Runtime Environment
... many more ...
Clojure adds a lot of syntactic sugar for calling Java. We won’t get into the details here
(see Calling Java), but notice that in the following code, the Clojure version has fewer
parentheses than the Java version:
// Java
"hello".getClass().getProtectionDomain()
; Clojure
(.. "hello" getClass getProtectionDomain)
Other documents randomly have
different content
affaiblissent auprès des musulmans la voix de l'Europe en laissant
soupçonner ses dissentiments, il est permis d'espérer qu'ils seront
entendus, qu'ils porteront d'heureux fruits, que le pouvoir du sultan,
devenu tolérable pour ses sujets, se raffermira pour longtemps
encore, et que les complots des sociétés propagandistes échoueront
misérablement. Si on suivait une autre marche, si les puissances,
uniquement préoccupées des attaques dirigées contre le pouvoir du
sultan, négligeaient de faire disparaître les causes qui font la gravité
de ces attaques et les rendent réellement dangereuses, on peut
prédire que ces puissances ne réussiraient pas dans leurs efforts, et
que tôt ou tard le sentiment européen, révolté des atrocités d'un tel
régime, les forcerait de l'abandonner à sa destinée. Ce qui s'est
passé, il y a quinze ans à l'égard de la Grèce dit clairement ce qui
arriverait.»
«Tout le monde, à cette heure, est convaincu que s'il reste au vice-
roi une chance de conserver ou d'obtenir quelque chose au delà de
l'Égypte seule, cette chance n'existe qu'à la double condition de se
déclarer immédiatement prêt à accepter tout ce qui lui serait offert,
et de renoncer à toute résistance, fondée sur l'espoir de concessions
plus amples. Cette conviction, le gouvernement du roi la partage. Je
ne dis pas que Méhémet-Ali ne puisse point, pour un temps encore
assez long peut-être, prolonger la lutte en Syrie. Je l'ignore; mais le
sentiment général, mais mon propre sentiment est que, dans cette
voie, le temps ne peut, en définitive, que tourner contre lui et
amener des complications nouvelles dont l'effet pourrait aller jusqu'à
l'atteindre au siége même de sa puissance.
«Quant à la France, elle ne veut pas, elle ne fera pas la guerre pour
permettre à Méhémet-Ali d'alimenter la lutte dans cette contrée.
Méhémet-Ali est encore aujourd'hui maître de demeurer tranquille
possesseur, possesseur héréditaire de l'Égypte; il a même encore, je
le crois du moins, quelque chance d'obtenir, par la voie des
négociations, un peu plus que l'Égypte: s'il entre sans retard dans
cette voie, s'il est franchement disposé à accepter désormais les
décisions du divan, la France redoublera d'efforts pour que ces
décisions soient aussi favorables au vice-roi que la situation le
comporte. Mais s'il était au contraire dans la pensée de Méhémet-Ali
de jouer le tout pour le tout, de risquer même son existence en
Égypte pour se maintenir en Syrie, s'il espérait pouvoir entraîner
ainsi la France à prendre pour lui les armes, il tomberait dans la plus
dangereuse des illusions. La France ne souffrira pas que qui que ce
soit l'entraîne dans une guerre pour des intérêts qu'elle ne
regarderait pas comme siens et comme assez puissants pour lui faire
prendre une telle résolution.
«Je crois en avoir assez dit, monsieur, pour vous faire clairement
comprendre ce que doivent être votre attitude et votre langage. Le
meilleur, le plus grand service que nous puissions rendre aujourd'hui
au vice-roi, c'est de lui dire la vérité tout entière et sur sa situation
et sur la pensée du gouvernement du roi. Je crois d'ailleurs inutile
d'ajouter que cette lettre est toute confidentielle, et que vous devez
avoir soin d'imprimer le même caractère aux communications et aux
conseils dont elle vous fournira la matière auprès de Méhémet-Ali.»
Et le 29 novembre:
«C'est dans cette pensée que j'ai dirigé hier ma conversation avec le
baron de Bulow et avec le prince Esterhazy. Je n'avais point avec eux
le même intérêt qu'avec lord Palmerston à circonscrire étroitement
les limites de la discussion. Je les sais tous deux préoccupés, au
É
moins autant que moi, de la nécessité de maintenir l'Égypte hors du
débat. Leurs instructions sont positives comme leurs intentions.»
«Je serais donc d'avis que cette soumission fût acceptée, qu'un
officier de Sa Hautesse fût envoyé à Alexandrie, que Méhémet-Ali
reçût l'injonction de lui remettre la flotte ottomane; que, d'après les
termes de l'acte séparé de la convention du 15 juillet, les
commandants alliés fussent invités à assister à cette remise; que le
pacha fût sommé d'évacuer les provinces ou villes de l'empire
ottoman qu'occupent encore les troupes égyptiennes, et qui se
trouvent situées en dehors des limites de l'Égypte; enfin, que le vizir,
en répondant à sa lettre, lui annonçât que ces conditions, une fois
remplies en entier, Sa Hautesse, par égard pour ses alliés, daignerait
le réinstaller dans ses fonctions de pacha d'Égypte. Ce conseil est
celui que la conférence de Londres a voulu que nous donnassions à
la Sublime-Porte, dans le cas où Méhémet-Ali se rendrait à la
sommation qui vient de lui être faite. Quant au tribut, aux forces de
terre et de mer, et aux lois qui devront gouverner l'Égypte, ces
points ont été réglés d'avance par la convention du 15 juillet, et il
suffira d'exécuter, à cet égard, les stipulations que renferment les
art. 3, 5 et 6 de l'acte séparé annexé à la convention.
É
Qu'avons-nous répondu? Qu'il fallait que la question d'Égypte fût
réellement réglée, qu'il ne suffisait pas que l'hérédité fût accordée en
principe au pacha, qu'il fallait voir quelles conditions lui seraient
faites, de quelle manière sa situation serait réglée dans cette Égypte
qu'on lui concédait héréditairement; que, jusque-là, tant que cette
question ne serait pas résolue, la France ne pouvait considérer le
traité du 15 juillet comme éteint.
On nous disait qu'il était éteint; on nous disait qu'on ne ferait plus
rien en vertu du traité du 15 juillet; que les puissances se
considéraient comme dégagées des obligations qu'il leur imposait;
que, désormais, si de nouveaux différends s'élevaient entre le sultan
et le pacha, ils se videraient entre eux, sans aucune intervention des
puissances étrangères. On nous l'assurait à Londres.
Y avait-il donc une raison pour que la France ne sortît pas de son
isolement? La France avait-elle été au-devant des puissances? Leur
avait-elle demandé à rentrer dans le concert européen? Lui imposait-
on quelques conditions qu'elle ne pût, qu'elle ne dût pas
honorablement accepter? On ne lui imposait aucune condition, on ne
lui demandait rien; on lui demandait tout simplement ce qu'elle avait
toujours elle-même proclamé le but de sa politique. Permettez-moi
de vous le dire, il eût été insensé de refuser; il eût été impossible de
donner une raison sérieuse pour un entêtement puéril dans un
isolement inutile. (Aux centres: Très-bien!) Ce que le cabinet a fait,
c'est ce que tout homme sensé, étranger aux préoccupations de
l'esprit de parti, eût fait nécessairement dans une pareille
circonstance. (Nouvelle approbation.)
Messieurs, on s'effraye de ces mots concert européen. Oui, la France
est rentrée dans le concert européen: cela veut-il dire que la Sainte-
Alliance est ressuscitée, que la France s'est engagée dans quelque
coalition semblable? Cela veut-il dire que la France a abdiqué une
portion quelconque de son indépendance, de sa politique? Non,
messieurs, il n'y a point d'engagement sur aucun point déterminé; il
n'y a point de traité conclu dans tel ou tel but; il n'y a aucune
abdication d'aucune partie de la politique, de l'indépendance de la
France. Ce qu'on appelle le concert européen, c'est simplement
l'esprit de paix entre les grandes puissances de l'Europe; c'est
simplement la manifestation de cette pensée commune que, si
quelque grand événement survient, avant de recourir aux chances
de la guerre, on essayera de s'entendre et de résoudre en commun
les grandes questions politiques. Voilà ce qu'on appelle le concert
européen. (Très-bien!)
Mais les événements suivent leur cours, les années n'ont pas toutes
les mêmes nécessités; les temps sont changés. Des difficultés sont
survenues; la diversité des politiques des deux pays s'est manifestée
sur plusieurs points; l'alliance intime n'existe plus.
Mais il y a une autre question qui me tient à cœur autant qu'à ceux
qui l'élèvent si bruyamment tous les jours; c'est ce qu'on appelle
l'abaissement de mon pays, le défaut de dignité de sa politique. Je
regrette qu'une telle question soit ainsi vaguement posée. À mon
avis, nous ne devrions monter à cette tribune, surtout en matière de
politique extérieure, que pour y débattre des questions réelles,
actuelles, pour savoir comment les affaires de notre pays ont été
conduites en chaque occasion, si elles l'ont été selon ses intérêts et
son honneur. J'ai peu de goût, je l'avoue, pour ces conversations
universelles, sans objet précis, qu'on recommence sans cesse pour
prouver l'abaissement de notre pays. Cependant, et bien qu'à regret,
j'y entrerai. On a abusé si étrangement de ces idées vagues pour
irriter, pour égarer, pour attrister la France, que, quelque
inconvénient qu'il puisse y avoir, il faut bien que je les aborde à mon
tour, et que je nie ce dont on nous accuse.
Tout cela est faux. Il n'est pas vrai que, depuis 1830, la France soit
abaissée. (Mouvement et exclamations à gauche.) Il n'est pas vrai
qu'elle ait perdu de son influence et de sa dignité en Europe.
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.
textbookfull.com