C++20 Quick Syntax Reference A Pocket Guide to
the Language, APIs, and Library. 4th Edition
Mikael Olsson pdf download
https://textbookfull.com/product/c20-quick-syntax-reference-a-
pocket-guide-to-the-language-apis-and-library-4th-edition-mikael-
olsson-2/
Download more ebook instantly today - get yours now at textbookfull.com
We believe these products will be a great fit for you. Click
the link to download now, or visit textbookfull.com
to discover even more!
C++20 Quick Syntax Reference A Pocket Guide to the
Language, APIs, and Library. 4th Edition Mikael Olsson
https://textbookfull.com/product/c20-quick-syntax-reference-a-
pocket-guide-to-the-language-apis-and-library-4th-edition-mikael-
olsson-2/
C# 7 Quick Syntax Reference: A Pocket Guide to the
Language, APIs, and Library Mikael Olsson
https://textbookfull.com/product/c-7-quick-syntax-reference-a-
pocket-guide-to-the-language-apis-and-library-mikael-olsson/
C# 7 Quick Syntax Reference: A Pocket Guide to the
Language, APIs, and Library 2nd Edition Mikael Olsson
https://textbookfull.com/product/c-7-quick-syntax-reference-a-
pocket-guide-to-the-language-apis-and-library-2nd-edition-mikael-
olsson/
C++17 quick syntax reference: a pocket guide to the
language, APIs and library Third Edition Olsson
https://textbookfull.com/product/c17-quick-syntax-reference-a-
pocket-guide-to-the-language-apis-and-library-third-edition-
olsson/
C++17 quick syntax reference: apocket guide to the
language, apis and library 2 edition Edition Olsson
https://textbookfull.com/product/c17-quick-syntax-reference-
apocket-guide-to-the-language-apis-and-library-2-edition-edition-
olsson/
Haskell Quick Syntax Reference: A Pocket Guide to the
Language, APIs, and Library 1st Edition Stefania
Loredana Nita
https://textbookfull.com/product/haskell-quick-syntax-reference-
a-pocket-guide-to-the-language-apis-and-library-1st-edition-
stefania-loredana-nita/
PHP 8 Quick Scripting Reference A Pocket Guide to PHP
Web Scripting Third Edition Mikael Olsson
https://textbookfull.com/product/php-8-quick-scripting-reference-
a-pocket-guide-to-php-web-scripting-third-edition-mikael-olsson/
Java quick syntax reference Second Edition Olsson
https://textbookfull.com/product/java-quick-syntax-reference-
second-edition-olsson/
PHP 8 Quick Scripting Reference 3rd Edition
Mikael Olsson
https://textbookfull.com/product/php-8-quick-scripting-
reference-3rd-edition-mikael-olsson/
Mikael Olsson
C++20 Quick Syntax Reference
A Pocket Guide to the Language, APIs, and Library
4th ed.
Mikael Olsson
Hammarland, Finland
Any source code or other supplementary material referenced by the
author in this book is available to readers on GitHub via the book’s
product page, located at www.apress.com/9781484259948 . For
more detailed information, please visit
http://www.apress.com/source-code .
ISBN 978-1-4842-5994-8 e-ISBN 978-1-4842-5995-5
https://doi.org/10.1007/978-1-4842-5995-5
© Mikael Olsson 2020
This work is subject to copyright. All rights are reserved by the
Publisher, whether the whole or part of the material is concerned,
specifically the rights of translation, reprinting, reuse of illustrations,
recitation, broadcasting, reproduction on microfilms or in any other
physical way, and transmission or information storage and retrieval,
electronic adaptation, computer software, or by similar or dissimilar
methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks,
service marks, etc. in this publication does not imply, even in the
absence of a specific statement, that such names are exempt from the
relevant protective laws and regulations and therefore free for general
use.
The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.
Distributed to the book trade worldwide by Springer Science+Business
Media New York, 233 Spring Street, 6th Floor, New York, NY 10013.
Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-
ny@springer-sbm.com, or visit www.springeronline.com. Apress Media,
LLC is a California LLC and the sole member (owner) is Springer
Science + Business Media Finance Inc (SSBM Finance Inc). SSBM
Finance Inc is a Delaware corporation.
Introduction
The C++ programming language is a general-purpose multiparadigm
language created by Bjarne Stroustrup. The development of the
language started in 1979 under the name “C with classes.” As the name
implies, it was an extension of the C language with the additional
concept of classes. Stroustrup wanted to create a better C that
combined the power and efficiency of C with high-level abstractions to
better manage large development projects. The resulting language was
renamed C++ (pronounced “C-plus-plus”) in 1983. As a deliberate
design feature, C++ maintains compatibility with C, and so most C code
can easily be made to compile in C++.
The introduction of C++ became a major milestone in the software
industry as a widely successful language for both system and
application development. System programming involves software that
controls the computer hardware directly, such as drivers, operating
systems, and software for embedded microprocessors. These areas
remain the core domain of the language, where resources are scarce
and come at a premium. C++ is also widely used for writing
applications, which run on top of system software, especially high-
performance software such as games, databases, and resource-
demanding desktop applications. Despite the introduction of many
modern, high-level languages in this domain—such as Java, C#, and
Python—C++ still holds its own and overall remains one of the most
popular and influential programming languages in use today.
There are several reasons for the widespread adoption of C++. The
foremost reason was the rare combination of high-level and low-level
abstractions from the hardware. The low-level efficiency was inherited
from C, and the high-level constructs came in part from a simulation
language called Simula. This combination makes it possible to write
C++ software with the strength of both approaches. Another strong
point of the language is that it does not impose a specific programming
paradigm on its users. It is designed to give the programmer a lot of
freedom by supporting many different programming styles or
paradigms, such as procedural, object-oriented, and generic
programming.
C++ is updated and maintained by the C++ standards committee. In
1998, the first international standard was published, known informally
as C++98. The language has since undergone five more revisions with
further improvements, including C++03, C++11, C++14, C++17, and
most recently C++20, which is the latest ISO standard for the C++
programming language released in 2020.
Table of Contents
Chapter 1:Hello World
Choosing an IDE
Creating a Project
Adding a Source File
Selecting Language Standard
Hello World
Using the Standard Namespace
IntelliSense
Chapter 2:Compile and Run
Visual Studio Compilation
Console Compilation
Comments
Chapter 3:Variables
Data Types
Declaring Variables
Assigning Variables
Variable Scope
Integer Types
Signed and Unsigned Integers
Numeric Literals
Floating-Point Types
Literal Suffixes
Char Type
Bool Type
Chapter 4:Operators
Arithmetic Operators
Assignment Operators
Increment and Decrement Operators
Comparison Operators
Logical Operators
Bitwise Operators
Operator Precedence
Chapter 5:Pointers
Creating Pointers
Dereferencing Pointers
Pointing to a Pointer
Dynamic Allocation
Null Pointer
Chapter 6:References
Creating References
References and Pointers
Reference and Pointer Guideline
Rvalue Reference
Chapter 7:Arrays
Array Declaration and Allocation
Array Assignment
MultidimensionalArrays
Dynamic Arrays
Array Size
Vector
Chapter 8:Strings
String Combining
Escape Characters
String Compare
String Functions
String Encodings
String Formatting
Chapter 9:Conditionals
If Statement
Switch Statement
Ternary Operator
Initializers
Chapter 10:Loops
While Loop
Do-while Loop
For Loop
Break and Continue
Goto Statement
Chapter 11:Functions
Defining Functions
Calling Functions
Function Parameters
Default Parameter Values
Function Overloading
Return Statement
Forward Declaration
Pass by Value
Pass by Reference
Pass by Address
Return by Value, Reference, or Address
Inline Functions
Auto and Decltype
Returning Multiple Values
Lambda Functions
Chapter 12:Classes
Class Methods
Inline Methods
Object Creation
Accessing Object Members
Forward Declaration
Chapter 13:Constructors
Constructor Overloading
This Keyword
Field Initialization
Default Constructor
Destructor
Special Member Functions
Object Initialization
Direct Initialization
Value Initialization
Copy Initialization
New Initialization
Aggregate Initialization
Uniform Initialization
Designated Initializers
Chapter 14:Inheritance
Upcasting
Downcasting
Constructor Inheritance
Multiple Inheritance
Chapter 15:Overriding
Hiding Derived Members
Overriding Derived Members
Base Class Scoping
Pure Virtual Functions
Chapter 16:Access Levels
Private Access
Protected Access
Public Access
Access Level Guideline
Friend Classes and Functions
Public, Protected, and Private Inheritance
Chapter 17:Static
Static Fields
Static Methods
Static Local Variables
Static Global Variables
Chapter 18:Enum Types
Enum Example
Enum Constant Values
Enum Scope
Weakly Typed Enums
Enum Constant Type
Chapter 19:Structs and Unions
Structs
Struct Initialization
Union
Anonymous Union
Chapter 20:Operator Overloading
Binary Operator Overloading
Unary Operator Overloading
Comparison Operator Overloading
Overloadable Operators
Chapter 21:Custom Conversions
Implicit Conversion Constructor
Explicit Conversion Constructor
Conversion Operators
Explicit Conversion Operators
Chapter 22:Namespaces
Accessing Namespace Members
Nesting Namespaces
Importing Namespaces
Namespace Member Import
Namespace Alias
Type Alias
Including Namespace Members
Chapter 23:Constants
Constant Variables
Constant Pointers
Constant References
Constant Objects
Constant Methods
Constant Return Type and Parameters
Constant Fields
Constant Expressions
Immediate Functions
Constant Guideline
Chapter 24:Preprocessor
Including Source Files
Define
Undefine
Predefined Macros
Macro Functions
Conditional Compilation
Compile if Defined
Error
Line
Pragma
Attributes
Chapter 25:Exception Handling
Throwing Exceptions
Try-Catch Statement
Rethrowing Exceptions
Noexcept Specifier
Exception Class
Chapter 26:Type Conversions
Implicit Conversions
Explicit Conversions
C++ Casts
Static Cast
Reinterpret Cast
Const Cast
C-Style and New-Style Casts
Dynamic Cast
Dynamic or Static Cast
Chapter 27:Smart Pointers
Unique Pointer
Shared Pointer
Weak Shared Pointer
Chapter 28:Templates
Function Templates
Calling Function Templates
Multiple Template Parameters
Class Templates
Non-type Parameters
Default Types and Values
Class Template Specialization
Function Template Specialization
Variable Templates
Variadic Templates
Fold Expressions
Concepts
Abbreviated Function Templates
Template Lambdas
Chapter 29:Headers
Why Use Headers
Using Headers
What to Include in Headers
Inline Variables
Include Guards
Modules
Index
About the Author and About the Technical
Reviewer
About the Author
Mikael Olsson
is a professional web entrepreneur, programmer, and author. He works
for an R&D company in Finland where he specializes in software
development.
In his spare time, he writes books and creates websites that
summarize various fields of interest. The books he writes are focused
on teaching their subject in the most efficient way possible, by
explaining only what is relevant and practical without any unnecessary
repetition or theory.
About the Technical Reviewer
Marc Gregoire
is a software engineer from Belgium. He graduated from the University
of Leuven, Belgium, with a degree in “Burgerlijk ingenieur in de
computerwetenschappen” (equivalent to a master of science degree in
computer engineering). The year after, he received the cum laude
degree of master in artificial intelligence at the same university. After
his studies, Marc started working for a software consultancy company
called Ordina Belgium. As a consultant, he worked for Siemens and
Nokia Siemens Networks on critical 2G and 3G software running on
Solaris for telecom operators. This required working on international
teams stretching from South America and the United States to Europe,
the Middle East, and Asia. Currently, Marc works for Nikon Metrology
on industrial 3D laser scanning software.
© Mikael Olsson 2020
M. Olsson, C++20 Quick Syntax Reference
https://doi.org/10.1007/978-1-4842-5995-5_1
1. Hello World
Mikael Olsson1
(1) Hammarland, Finland
Choosing an IDE
To begin developing in C++, you need a text editor and a C++ compiler.
You can get both at the same time by installing an Integrated
Development Environment (IDE) that includes support for C++. A good
choice is Microsoft's Visual Studio Community Edition, which is a free
version of Visual Studio that is available from Microsoft’s website.1 The
C++ compiler that comes with this IDE has good support for the C++17
standard and includes many features of C++20 as of the 2019 version. If
you are running the Visual Studio installer on Windows, make sure to
select the “Desktop development with C++” workload to enable
development in C++.
Visual Studio is available on Windows and Mac, and there is a
lightweight version called Visual Studio Code which can also be run on
Linux. Two other popular cross-platform IDEs include NetBeans and
Eclipse CDT. Alternatively, you can develop using a simple text editor
such as Notepad, although this is less convenient than using an IDE. If
you choose to use a simple text editor, just create an empty document
with a .cpp file extension and open it in the editor of your choice.
Creating a Project
After installing Visual Studio 2019, go ahead and launch the program.
You then need to create a project, which will manage the C++ source
files and other resources. Go to File ➤ New ➤ Project in Visual Studio
to display the Create a new project window. From there, select the C++
language from the drop-down list to view only the C++ project
templates. Then select the Empty Project template and click the Next
button. At the next screen, you can configure the name and location of
the project if you want to. When you are finished, click the Create
button to let the wizard create your empty project.
Adding a Source File
You have now created a C++ project. In the Solution Explorer pane
(choose View ➤ Solution Explorer), you can see that the project
consists of three empty folders: Header Files, Resource Files, and
Source Files. Right-click the Source Files folder and choose Add ➤ New
Item. From the Add New Item dialog box, choose the C++ File (.cpp)
type. Give this source file the name MyApp and click the Add button. An
empty .cpp file will now be added to your project and opened for you.
Selecting Language Standard
To enable the latest features of the C++ language outlined in this book,
it is necessary to manually change the language standard setting for
your project. You can do this by first going to Project ➤ Properties to
bring up the Property pages. From there, navigate to Configuration
Properties ➤ C/C++ ➤ Language ➤ C++ Language Standard. Select the
latest standard from the drop-down list (std:c++latest). Click OK and
the project will now be configured to compile with the latest supported
C++20 features.
Hello World
The first thing to add to the source file is the main() function. This is
the entry point of the program, and the code inside of the curly brackets
is executed when the program runs. The brackets, along with their
content, are referred to as a code block, or just a block.
int main() {}
The first application will simply output the text "Hello World "
to the screen. Before this can be done, the iostream header needs to
be included. This header provides input and output functionality for the
program, and it is one of the standard library files that comes with all
C++ compilers. The #include directive effectively replaces the line
with everything in the specified header before the file is compiled into
an executable.
#include <iostream>
int main() {}
With iostream included, you gain access to several new functions.
These are all located in the standard namespace called std, which you
can examine by using a double colon, also called the scope resolution
operator (::) . After typing this in Visual Studio, the IntelliSense
window will automatically open, displaying the namespace contents.
Among the members, you find the cout stream. This is the standard
output stream in C++ which can be used to print text to a console
window. It uses two less than signs, collectively known as the insertion
operator (<<), to indicate what to output. The string can then be
specified, delimited by double quotes, and followed by a semicolon. The
semicolon is used in C++ to mark the end of a statement.
#include <iostream>
int main()
{
std::cout << "Hello World";
}
Using the Standard Namespace
To make things a bit easier, you can add a using directive to specify that
this code file uses the standard namespace. You then no longer have to
prefix cout with the namespace (std::) since it is used by default.
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World";
}
IntelliSense
When writing code in Visual Studio, a window called IntelliSense will
pop up wherever there are multiple predetermined alternatives from
which to choose. This window can also be brought up manually at any
time by pressing Ctrl+Space to provide quick access to any code entities
you are able to use within your program. This is a very powerful feature
that you should learn to make good use of.
Footnotes
1 http://visualstudio.microsoft.com
© Mikael Olsson 2020
M. Olsson, C++20 Quick Syntax Reference
https://doi.org/10.1007/978-1-4842-5995-5_2
2. Compile and Run
Mikael Olsson1
(1) Hammarland, Finland
Visual Studio Compilation
Continuing from the last chapter, the Hello World program is now
complete and ready to be compiled and run. You can do this by going to
the Debug menu and clicking Start Without Debugging (Ctrl+F5). Visual
Studio then compiles and runs the application, which displays the text
in a console window.
Console Compilation
As an alternative to using an IDE, you can also compile source files from
a terminal window as long as you have a C++ compiler.1 For example, on
a Linux machine, you can use the GNU C++ compiler, which is available
on virtually all UNIX systems, including Linux and the BSD family, as
part of the GNU Compiler Collection (GCC). This compiler can also be
installed on Windows by downloading MinGW or on the Mac as part of
the Xcode development environment.
To use the GNU compiler, you type its name g++ in a terminal
window and give it the input and output file names as arguments. It
then produces an executable file, which when run gives the same result
as the one compiled in Visual Studio.
g++ MyApp.cpp -o MyApp
./MyApp
Hello World
Comments
Comments are used to insert notes into the source code. They have no
effect on the end program and are meant only to enhance the
readability of the code, both for you and for other developers. C++ has
two kinds of comment notations: single-line and multiline. The single-
line comment starts with // and extends to the end of the line.
// single-line comment
The multiline comment may span more than one line and is
delimited by /* and */.
/* multi-line
comment */
Keep in mind that whitespace characters—such as spaces and tabs
—are generally ignored by the compiler. This gives you a lot of freedom
in how to format your code.
Footnotes
1 www.stroustrup.com/compilers.html
© Mikael Olsson 2020
M. Olsson, C++20 Quick Syntax Reference
https://doi.org/10.1007/978-1-4842-5995-5_3
3. Variables
Mikael Olsson1
(1) Hammarland, Finland
Variables are used for storing data in memory during program
execution.
Data Types
Depending on the type of data you need to store, there are several kinds
of built-in data types. These are often called fundamental data types or
primitives . The integer (whole number) types are short, int, long,
and long long. The float, double, and long double types are
floating-point (real number) types. The char type holds a single
character, and the bool type contains either a true or false value.
Data Type Size (Byte) Description
char 1 Integer or character
short 2 Integer
int 4 Integer
Long 4 or 8 Integer
long long 8 Integer
float 4 Single-precision floating number
double 8 Double-precision floating number
long double 8 or 16 Floating-point number
Data Type Size (Byte) Description
bool 1 Boolean value
In C++, the exact size and range of primitive data types are not
defined by the standard. Instead, they are dependent on the system for
which the program is compiled. The sizes shown in the previous table
are found on most 32-bit systems and are given in C++ bytes. A byte in
C++ is the minimum addressable unit of memory which is guaranteed
to be at least 8 bits, but might also be 16 or 32 bits depending on the
system. By definition, a char in C++ is 1 byte in size. Furthermore, the
int type will be 32 bits in size on 32-bit and 64-bit systems. Each
integer type in the table must be at least as large as the one preceding
it. The same applies to floating-point types, where each one must
provide at least as much precision as the preceding one.
Declaring Variables
To declare (create) a variable, you start with the data type you want the
variable to hold followed by an identifier, which is the name of the
variable. The name can consist of letters, numbers, and underscores,
but it cannot start with a number. It also cannot contain spaces or
special characters and must not be a reserved keyword.
int myInt; // correct
int 32Int; // incorrect (starts with number)
int Int 32; // incorrect (contains space)
int Int@32; // incorrect (contains special
character)
int new; // incorrect (reserved keyword)
Assigning Variables
To assign a value to a declared variable, you use an equals sign, which is
called the assignment operator (=).
myInt = 50;
The declaration and assignment can be combined into a single
statement. When a variable is assigned a value, it then becomes defined.
int myInt = 50;
At the same time that the variable is declared, there are two
alternative ways of assigning, or initializing, it by enclosing the value in
either parentheses or braces. These examples are equivalent to the
previous statement.
int myInt2(50); // direct initialization
int myInt3{50}; // uniform initialization
If you need to create more than one variable of the same type, there
is a shorthand way of doing this using the comma operator (,).
int x = 1, y = 2, z;
Once a variable has been defined (declared and assigned), you can
use it by simply referencing the variable’s name, for example, to print it.
Note the use of the endl stream manipulator token here to add a line
break to the output stream.
cout << x << y << endl; // "12"
Variable Scope
The scope of a variable refers to the region of code within which it is
possible to use that variable. Variables in C++ may be declared both
globally and locally. A global variable is declared outside of any code
blocks and is accessible from anywhere after it has been declared. A
local variable, on the other hand, is declared inside of a function and
will only be accessible within that function after it has been declared.
The lifetime of a local variable is also limited. A global variable will
remain allocated for the duration of the program, while a local variable
will be destroyed when its function has finished executing.
int globalVar; // global variable
int main() { int localVar; } // local variable
The default values for these variables are also different. Global
variables are automatically initialized to zero by the compiler, whereas
local variables are not initialized at all. Uninitialized local variables will
therefore contain whatever garbage is already present in that memory
location.
int globalVar; // initialized to 0
int main()
{
int localVar; // uninitialized
}
Using uninitialized variables is a common programming mistake
that can produce unexpected results. It is therefore a good idea to
always give your local variables an initial value when they are declared.
int main()
{
int localVar = 0; // initialized to 0
}
Integer Types
There are four integer types you can use depending on how large a
number you need the variable to hold.
char myChar = 0; // -128 to +127
short myShort = 0; // -32768 to +32767
int myInt = 0; // -2^31 to +2^31-1
long myLong = 0; // -2^31 to +2^31-1
C++11 standardized a fifth integer type, long long, which is
guaranteed to be at least 64 bits large. Many compilers started to
support this data type well before the C++11 standard was complete,
including the Microsoft C++ compiler.
Another Random Scribd Document
with Unrelated Content
any name found on the monuments, and in all probability the mere
product of his own fancy. His Median history is equally baseless.
(See the Critical Essays, Essay iii.) In his Persian history, he transfers
to the time of Cyrus the corruptions prevalent in his own day, forges
names and numbers at pleasure, and distorts with wonderful
audacity the historical facts best known to the Greeks. The
montiments convict him of direct falsehood in numerous instances,
as in the name of the brother of Cambyses, the circumstances of the
Magian revolution, the names of the six conspirators, the place and
manner of Cambyses' death, the early supremacy of Assyria, the
time at which Media rose into importance, &c. &c. Authentic
documents, like the Canon of Ptolemy and the dynastic tables of
Manetho, contradict his chronological data ; as, c. g., the number of
years which he assigns to Cambyses and Darius Hystaspes, where
Herodotus and the aforesaid documents are agreed. The credibility
of his history, where it touches the Greeks, may be fairly estimated
by comparing his account of the revolt of Inarus (Pers, Ex. § 32, et
seq.) with the narrative of Thucydides (i. 104, 109, 110). ^ See
Biihr's Commentatio de Vit. et Script. Herod. § 10 ; Dahlmann's Life,
ch. viii.; Mure's Literature of Greece, vol. iv. p. 265. The last-named
writer observes: "The tract of Plutarch, ' On the Malignity of
Herodotus,'
64 TESTDIOXIES TO THE HONESTY OF HERODOTUS. Life
and instance can lie be said to have proved his case, or convicted
our author of a misstatement ; in one only has he succeeded in
throwing any considerable doubt on the view taken by Herodotus of
an important matter.^ The writers who have followed in the wake of
these two assailants of Herodotus can scarcely be said to have
succeeded any better in their attacks on his veracity. The deliberate
judgment of modem criticism on the subject is decidedly against the
assailants, and cannot be better summed up than in the words of a
recent author : — " There can be no doubt," says Col. 3Iure, "that
Herodotus was, according to the standard of his age and country, a
sensible and intelligent man, as well as a writer of power and
genius, and that he possessed an extensive knowledge of human life
and character. Still less can it reasonably be questioned that Tie was
an essentially honest and veracious historian. Such he has been
admitted to be by the more impartial judges both of his own and
subsequent periods of ancient literatm'e, and by the all hut
unanimous verdict of the modern puhlic. Eigid, in fact, as has been
the scrutiny to which his text has been subjected, no distinct case of
wilful misstatement or perversion of fact has been substantiated
against him. On the contrary, the very severity of the ordeal has
often been the means of eliciting evidence of his truth in cases
where, with the greatest temptation to falsehood, there was the
least apparent risk of detection. Every portion indeed of his work is
pervaded by an air of candour and honest intention, which the
discerning critic must recognise as reflecting corresponding qualities
in the author." ^ It is unnecessary to add anything to this testimony,
which coming from one whose critical knowledge is so great, and
who is certainly not a blind admirer of Herodotus, must be regarded
as almost closing the controversy. To the two excellencies of
diligence in collecting materials and honesty in making use of them
Herodotus adds a third, less common than either of the others, that
of the strictest impartiality. Here again, however, his merit has not
been uncontested. The Pseudo-Plutarch accuses him of nourishing a
is a condensation of these calumnies; connexion with the battle of
Thermofor as such they have been recognised by pylas. See Plut. de
Malign. Herod, pp. the intelligent public of every age removed 8o5-6,
and compare Grote's Greece, vol. from the prejudices in which they
ori- v. pp. 122-3. See also the foot-notes to ginate." book vii. chs.
205 and 222. 1 The matter to which allusion is here ^ ]^£m.e's Lit.
of Greece, voL iv. p. made, is the conduct of the Thebans in 351.
Writings. HIS IMPARTIALITY. 65 special prejudice against
the Thebans because they bad refused to gratify his cupidity;^ and
another writer brings a similar charge against him with respect to
the Corinthians.'^ He has also been taxed more generally, and in
modern no less than ancient times/ with showing undue favour
towards the Athenians. But the charges of prejudice evaporate with
the calumnies of which they are the complement, and a reference to
his work shows that he had no unfriendly feeling towards either
nation. The valour displayed by the entire Boeotian cavalry at
Platoea is honourably noticed,*^ and the conduct of the Thebans on
the occasion receives special commemoration ; ^ the circumstances,
moreover, of the siege of Thebes^ are decidedly creditable to that
people. The Corinthians receive still more striking marks of his good-
will. The portraiture of their conduct from the time that they became
a free nation, is almost without exception favourable. They brave the
displeasure of the Spartans by withdrawing their contingent from a
joint army of Peloponnesians at a most critical moment, purely from
a sense of justice and a determination not to share in doing a
wrong.^ Subsequently at a council summoned by Sparta they alone
have the boldness to oppose the plan of the Lacedaemonians for
enslaving Athens, and to expose openly before all the allies the
turpitude of their proposals. ^° On another occasion they play the
part of peace-makers between Athens and Thebes. ^^ Somewhat
later, they evade an express law of their state, which forbade them
to give away ships of war, and liberally make the Athenians a present
of twenty triremes ^- — certainly a meritorious act in the eyes of
Herodotus. In the Persian war they act on the whole a strenuous
part, only inferior to that played by the Athenians and the Eginetans.
At Artemisium and at Salamis their contingent greatly exceeds that
of any other state except Athens. ^^ In the fight at the latter place
their behaviour, according to the version which Herodotus manifestly
prefers, is such as to place them in the first rank for bravery.^^
Their contingent at Plataea far exceeds that of any other state
except Athens and Sparta ;^^ and though, together with the great
bulk of the confederates, they were 3 Quoting Aristophanes of
Boeotia as ^ Herod, ix. 68. ^ Ibid. chs. 67 and 69. his authority, p.
864 D. s jj^jj^ ^.-^^^ §(3.3^ 9 Ibid. v. 75. 4 Dio Chrysost. Orat.
xxxvii. p. 456. i" Ibid. v. 92. " Ibid. vi. 108. 5 See Plut. de Malign.
Herod, p. 862, 12 ibid. ch. 89. " Ibid. viii. 1 and 43. A., where the
writer speaks of the charge ^^ 'Ev irpurolai ttjs vau/iax'T/s, viii. 94,
as one commonly made. i^ Ibid. ix. 2s. VOL. I. F
C6 HIS LEANING TOWARDS ATHENS, Life and absent from
the battle, they are mentioned among those who made all haste to
redeem their fault so soon as they heard of the engagement.^^
Finally, at Mycale they behave with great gallantry, and appear next
to the Athenians in the list of those who most distinguished
themselves.^ ^ The only discredit which attaches to the Corinthians
in connexion with the war regards the conduct of their naval
contingent, and especially of Adeimantus, its commander, in the
interval between the muster at Artemisium and the victory at
Salamis.^^ But here is no evidence of any peculiar prejudice ; for
they are merely represented as sharing in the feeling common to all
the Peloponnesians, and their prominency is the result of their
eminent position among the Spartan naval allies. These charges of
prejudice and illwill therefore fall to the ground when tested by a
general examination of the whole work of Herodotus, and it does not
appear that he is fairly taxable with "malignity," or even harshness in
his treatment of any Greek state. The accusation of an undue
leaning towards Athens is one which has prima facie a certain show
of justice, and which at any rate deserves more attention than these
unworthy imputations of spite and malice. The open and undisguised
admiration of the Athenians which Herodotus displays throughout his
work,^ the fact that to Athens he was indebted for a home and a
new citizenship when expelled from his native country,^ the very
probable fact of his having received at the hands of the Athenians a
sum of money on account of his History,^ make it not unlikely that
he may have allowed his judgment to be warped in some degree by
his favourable feelings towards those to whom he was united by the
double bond of gratitude and mutual esteem. Again, in one instance,
he has certainly made an indefensible statement, the effect of which
is to add to the glory of the Athenians at the expense of other
Greeks.* Still a careful review of his entire narrative will show that,
however 1^ Herod, ch. 69. ^7 Ibid. ch. 105. sisted Megabazus (v.
2); the lonians ^\ Ibid, viii. 5, 59, 61. again, assisted by a few
Athenians and 1 See V. 79 ; vi. 112; vii. 139 ; viii. 10, Eretrians, met
the Persians in open fight 109, 143, 144 ; ix, 22, 27-8, 70, &c. at
Ephesus (v, 102) ; the Cyprian Greeks 2 Supra, p. 18, ^ Ibid, p. 13,
fought a Persian army near Salamis (v. 4 Herod, vi. 112, It is
certainly van- 110, 113); the Milesians were engaged atrue to say of
the Athenians at Marathon gainst another in Caria (v, 120); and a
that they " were the first of the Greeks hard battle was fought
between a strong who dared to look vipon the Median garb, body of
Persians and an army of Ionian and to face men clad in that
fashion," and -^olian Greeks near Atarneus (vi. The Ionian Greeks
fought bravely against 28, 29). Harpagus (i. 169); the Perinthians re
Writings. NOT A BLIND TARTIZANSHir. G7 favourably
disposed towards tlie Athenians, lie was no blind or undis,criminating
admirer, but openly criticised their conduct where it seemed to him
faulty, noticing with the same unsparing freedom which he has used
towards others, the errors, crimes, and follies of the Athenian people
and their greatest men. Where he first introduces the Athenians, he
speaks of the bulk of the nation as " loving tyranny better than
freedom," ^ and about the same time he notices that they suffered
themselves to be imposed upon by '•' one of the silliest devices to
be found in all history." ^ After the establishment of the democracy,
he ventures to call in question the wisdom of great Demns himself,
taxing him with " deceivableness," and declaring that he was more
easily deluded by fair words than an individual.'^ He describes the
general spirit of the Athenian people immediately before Marathon
as timid and wavering,^ condemns openly their treatment of the
heralds of Xerxes, which he regards as bringing them justly under
the divine displeasure,^ and passes a still more severe though
indirect censure upon their conduct towards the Eginetans in the
case of their hostages. '° He fui'ther exposes their spirit of detraction
towards their rivals by relating the account which they gave of the
behaviour of the Corinthians at Salamis, and at the same time clearly
intimating his own disbelief of it.^^ In the character of their great
men, with the solitary exception of Aristides, he notes flaws,
detracting very considerably from the admiration to which they
would otherwise have been entitled. Besides the imputation of
mercenary motives to Themistocles,^^ which has been generally
remarked, Clisthenes is denied the merit of disinterestedness in the
policy which formed his special glory,^^ and Miltiades is exhibited as
engaging in the expedition which brought disgrace alike on himself
and on his country, to gratify a private pique.^'* It cannot,
therefore, be said with any truth that Herodotus suffered his
admiration of the Athenians to degenerate into partizanship ; or did
more than assign them the meed of praise which he felt to be, and
which really was, their due. A single hyperbolical expression, which
his own work affords the means of correcting, cannot be allowed to
weigh in the balance against the general evidence of candour and
fairness furnished by his narrative. * Herod, i. 62. « xbid. ch. 60. ^
Ibid. vii. 133. ^o Ibid. vi. 86. 7 Ibid. V. 97. " Ibid. viii. 94. ^^ ibid.
viii. 4, 1 1 1, 1 1 2. 8 Ibid. vi. 109: comp. 124. " Ibid. v. 66 and 69.
i"* Ibid. vi. 133, F 2
0*8 JUSTICE TO THE PEESIANS. Life and Before taking
leave of this subject, it seems riglit to notice two special instances,
where the candour of Herodotus is very remarkably displayed under
circumstances of peculiar temptation. Born and bred up during the
continuance of the struggle between Greece and Persia, himself a
citizen of a Greek state which only succeeded in throwing off the
Persian yoke after he was grown to manhood, and led by his own
opinions to sympathise most warmly with the patriotic side, he might
have been pardoned had he felt a little bitterly towards that grasping
people, which, not content with ruling all Asia from India and Bactria
on the one hand, to Phoenicia and Lydia on the other, envied the
independence and sought to extinguish the hberties of Greece. In
lieu, however, of such a feeling, we find the very opposite tone and
spirit in all that he tells us of the Persians. Their valour,^ their
simplicity and hardiness,^ their love of truth,^ their devoted loyalty
to their princes,* their wise customs and laws,^ are spoken of with
a strength and sincerity of admiration which strongly marks his
superiority to the narrow spirit of national prejudice and partiality
too common in every age. It is evidently his earnest wish and aim to
do justice to the enemy no less than to his own countrymen. Hence
every occasion is seized to introduce traits of nobility, generosity,
justice, or self-devotion on the part of either prince or people.^ The
personal prowess of the Persians is declared to be not a whit inferior
to that of the Greeks,^ and constant apologies are made for their
defeats, which are ascribed to deficiencies in their arms, equipment,
or discipline,^ not to any want of courage or military S23irit. Of
course the defects of the nation and its chiefs are also recorded; but
there is every appearance of an honest intention to give them full
credit for every merit which they possessed, and the portraiture is
altogether about the most 1 Herod, vi. 113 ; viii. 100, 113 ; ix. 62,
ol"EX\7]V€s, koI ovk exoj/res TrXT]0€i XP"*)102, &c. aaa-QoLi (vii.
211). 6 Hep^ew (TTparhs virh 2 Ibid. i. 71 ; ix. 122. ineyddeos re
koI Tr\r]9eos avrhs utt' cuvtov 3 Ibid. i. 136, 138. eirnrre, Tapaa-
aofxevewu re twu j/ewy Kol -'* Ibid. viii. 99; comp.iii. 128, 154, 155;
TrepLimrTova-^ocv ncpl aW-fjAas (viii. 16). vii. 107, and viii. 118,
where the self- ratu fxlv 'EXX-fjucav crhv Koafx^
vav/j.ax^6udevotion, though not regarded as true, tuv Kara rd^iv,
rcou de ou T^rayjji^vwv eri appears to be considered natural. (viii.
86). ol Uepaai avoirkoi ioures Kal ^ Ibid. i. 137, 138 ; iii. 154. nphs
ap€iriar-f]fxov€s ^(rav (ix. 62.) Com^ Ibid. i. 115; iii. 2, 74, 75, 128,
140, pare v. 49, where the description of the 154-158, 160; v. 25; vi.
30, 119; vii. Persian equipment prepares us for the 27-29, 105, 107,
136, 181, 194, 237, &c. coming defeats. v fxdxv avroiv iarl ' Ibid. ix.
62. XrjixaTi ^eu vvv kol roiTjSe* T(^|a Kal at;t/Li7; ySpax^a,
ai^alnpiSus pciyUT? OVK €(rcroves ricruv ot Tlepcrai. 5e exoi/res
ipxovrai 4s ras fxdxots Kal ^ A6paai fipaxvTspoiai xpei/-i6rot, ^Trep
Kvp^aaias eVl rfjai KscpaAijai.
Writings. POLITICAL DISPASSIONATENESS. 69 favoui-able
tliat we possess of any Oriental nation either in ancient or modern
times.^ The other remarkable instance of our author's candour is
contained in his notices of Artemisia.^ Without assigning any
particular weight to the statements of Suidas as to the important
part which Herodotus played personally in the drama of
Halicarnassian politics, it is certain that if the revolution by which the
tyranny was put doAvn and the family of Artemisia expelled took
place in his time, his views and sympathies must have been
altogether on the popular side. He must undoubtedly have felt, even
if he did not act, with those who drove out the tyrant, and brought
Halicarnassus into the Athenian confederacy. The warm praise,
therefore, and open admiration which he bestows on Artemisia, is
indicative of a fair mind, which would not allow political partizanship
to blind him to individual merit. Of course, if the narrative of Suidas,
despite its weak authority, should be true — which has been
admitted to be possible ^ — the credit accorded to the
Halicarnassian queen would be a still more notable proof of candour.
In connexion with this trait it may be further observed that the
whole work of Herodotus exhibits very strikingly his political
moderation and freedom from party bias. Though decidedly
preferring democratic institutions to any other,^ he is fully aware
that they are not without their own peculiar evils,^ while every form
of government he recognises to have certain advantages.'^ A
consequence of this moderation of feeling is that fiiir distribution of
praise and blame among persons of different political sentiments,
which might have been imitated with advantage by the modern
writers who have treated of this period of history. Herodotus can see
and acknowledge the existence of faults in popular leaders,*^ and
of virtues in oligarchs, 9 Colouel Mure justly observes:— ^ Herod,
vii. 99; viii. 68, 87, 88, 102, ** Perhaps the best vindication of the
his- 103. 2 Supra, p. 12. torian's fairness, in so far as regards the ^
gee v. 78 ; vi. 5, &e. Persians, is the fact, that while the most *
These are very strongly put in the detailed account of that people
which speech of Megabyzus (iii. 81), and are we possess, and on
which we are chiefly glanced at in the following passages : iii.
accustomed to form our judgment of 142, 143; v. 97 ; vi. 109. their
character, is that transmitted by ^ See book iii. chs. 80-82, and
compare Herodotus, there is no nation among the praise given to
the evuo/uiia of Lythose who in ancient or modern times curgus (i.
65, 66), to the Milesian aristohave figured on the wide field of
Oriental cracy (v. 28, 29), and to the first tyranny politics, which for
patriotism, valour, of Pisisti'atus (i. 59, ad fin.), talent, and
generosity, occupies or de- ^ As in Clisthenes (v. ijQ, 69), in
Theserves to occupy so high a place in our mistocles (viii. 4, 109,
110, 111, 112), and estimation." — Lit. of Greece, vol. iv. in
Telesarchus, the Samian democrat (^iii, p. 435. 142).
70 FREEDOM FKOM NATIONAL VANITY. Life an'd or even
despots J He does not regard it as liis duty to whitewash the
characters of the one,^ or to blacken the memories of the other.
And the same dispassionateness appears in his account of the
conduct of states. The democratical Argos is shown to have pursued
a more selfish policy throughout the Persian war than almost any
other Greek power.^ The aristocratic Egina is given the fullest credit
for gallant behaviour.^" There is no attempt to gloss over faults or
failings because those to whom they attach agree with the author in
political opinions, or to exaggerate or imagine defects in those of
opposite views.^^ Herodotus also is, for a Greek, peculiarly free
from the defect of national vanity. He does not consider his own
nation either the oldest,^^ or the wisest,^^ or the greatest, ^^ or
even the most civilised of all. He loves his country dearly, admires its
climate,^^ delights in its free institutions, appreciates its spirit and
intelligence ; but he is quite open to perceive and acknowledge the
special advantages, whether consisting in superior antiquity, in
products, discoveries, wise laws, or grand and striking monuments,
of other kingdoms and regions. Egypt and Phrygia are the most
ancient, India and Thrace the most powerful countries; Babylonia is
beyond comparison the most fertile in grain ;^^ Scythia the most
secure against invasion ;^'^ Egypt, Babylon, and Lydia possess the
most wonderful works ;^^ Ethiopia the handsomest and longest-
lived men ;^^ Media the finest horses f^ Arabia, and the other "
extremities of the earth," the strangest and most excellent
commodities.^^ Wise laws are noted as obtaining in Persia,^^
Babylonia,^^ Egypt,^^ Yenetia f^ ' Sosicles, the Corinthian noble
(v. 92), of Periander (iii. 48-53; v. 92, § 6, 7), Pisistratus (i. 59 ),
Micandrius (iii. 142), Polycrates (iii. 39, 44, 123), Histiseus Crius the
Egiaetan (viii. 92, comp. vi. (iv. 137 ; v. 106 ; vi. 3, 26, 29;, C\'pselus
73), and Darius himself, are specimens. (v. 92, § 5), Aristagoras (v.
37', 124), 8 It may be thought that the chapters Arcesilaus III. (iv.
164), and Pheretima in book vi. which defend the Alcmseo- (iv. 202).
But the fact that tyrants are nidae from the charge of having been in
sometimes praised (i. 59 ; iii. 142; vii. 99, league with the Persians
at the time of &c.) seems to snow that at least Herothe battle of
Marathon (chs. 123-4) form dotus has no intention of dealing
unfairly an attempt of this kind. But to take by this class of men. this
View we must presume their guilt, ^^ Herod, ii. 2. ^^ ibid. iii. 38.
which the arguments of Herodotus show ^^ Ibid. v. 3. to be most
improbable. ^^ Ibid. iii. 106. Compare i. 142. 9 Herod, vii. 150—
152; ix. 12. 16 Ibid. i. 193. Compare iv. 198. 10 Ibid. vii. 181 ; viii.
91—93. i7 Ibid. iv. 46. is ibid. i. 93. 11 If thei-e is any exception to
the gene- i^ Ibid. iii. 20 and 22. Compare 114. ral practice here
noted, it is in the pic- 20 ibid. iii. 106, and vii. 40. tures given of
Greek tyrants, which have 21 Ibid. iii. 106-114. the appean^-nce of
being somewhat over- ^ Ibid, i. 136-7. ^ Ibid. i. 196-7. drawn. See
particularly the characters -^ Ibid. ii. 177. ^^ Ibid. i. 196.
Writings. DEFECTS AS AN HISTOIIIAN. 71 inventions of
importance are attributed to the Lyclians,^ the Carians,'^ the
Babylonians,^ the Egyptians/ and the wild races of northern Africa
;^ the adoption of customs, laws, and inventions from other
countries by the Greeks is freely admitted f the inferiority of their
great works and buildings to those of Egypt receives pointed
comment ;^ their skill as workmen, as sailors, and as builders of
ships, is placed in unfavourable comparison with that of the
PhoBnicians, especially those of Sidon.^ It is seldom indeed that an
author is found so thoroughly national, and yet at the same time so
entirely devoid of all arrogant assumption of superiority on behalf of
his nation. His liberality in this respect offers a strong contrast to the
general practice of his countrymen, whose contempt of " barbarians
" was almost equal to that of the Chinese. The merits of Herodotus
as a writer have never been denied or contested. Before attempting
any analysis of the qualities in which this excellence consists, it is
important to consider briefly those faults or blemishes — the "
anomalies of his genius," as they have been called ^ — which
detract from the value of his work as a record of facts, and form ' in
strictness of speech his defects as an historian. These, according to
the verdict of modern criticism, ^^ are three in number — 1.
Credulity, or an undue love of the marvellous, whether in religion, in
nature, or in the habits of men ; 2. An over-striving after effect,
leading to exaggerations, contradictions, and an excessive infusion
of the anecdotical element into his work ; and, 3. A want of critical
judgment and method, shown in a number of oversights,
inaccuracies, and platitudes, which cannot be accounted for by
either of the other habits of mind, but seem the mere result of the
absence of the critical faculty. These defects — the existence of
which it is impossible to deny — require to be separately examined
and weighed, the main question for determination being to what
extent they counteract the natural working of his many excellencies,
and so injure the character of his History. It is perhaps not of much
importance to inquire how far the admitted credulity of Herodotus
was the consequence of the age in which he lived, and so necessary
and excusable. He will not 1 Herod, i. 94. 2 ibid. i. 171. ' Ibid. ii.
148. 3 Ibid. ii. 109. 8 Ibid. vii. 23, 44, and 99. 4 Ibid. ii. 4, 82, 109,
&c.; iv. 180. ^ Mure's Literature of Greece, vol.iv. 5 Ibid. iv. 189. p.
354. 0 Ibid. i. 171; ii. 4, 50, 58, 109, &c. ; i" Ibid. pp. 352 and 409,
410. iv. 180, 189; and v. 58.
72 CREDULITY IN EELIGION— PRODIGIES. Life akd be the
better historian or the safer guide for the fact that his
contemporaries either generally, or even universally, shared his
errors. Some injustice seems to have been done him by a late critic,
who judges him by the standard of an age considerably later, and of
a country far more advanced than his own.^ But this question does
not affect the historical value of his work, which must be decided on
absolute, not on relative grounds. The true point for consideration is,
how far his work is injured by the defect in question — to what
extent it has disqualified him for the historian's office. Now the
credulity of Herodotus in matters of religion amounts to this. He
believes in the prophetic inspiration of the oracles, in the fact that
warnings are given to men through prodigies and dreams, and in the
occasional appearance of the gods on earth in a human form. He
likewise holds strongly the doctrine of a divine Nemesis, including
therein not only retribution, or the visible punishment of
presumption and other sins, but also jealousy, or the provocation of
divine anger by mere gi-eatness and prosperous fortune. How do
these two lines of belief affect his general narrative, and how far do
they detract from its authenticity ? With regard to the former class of
supernatural phsenomena, it must be observed, in the first place,
that they are for the most part mere excrescences, the omission of
which leaves the historic narrative intact, and which may therefore,
if we like, be simply put aside when we are employed in tracing the
course of events recorded by our author. The prodigies of Herodotus
no more interfere with the other facts of his History than those
which Livy so copiously relates, even in his later books,^ interfere
with his. They may offend the taste of the modern reader 1 Col.
Mure represents Herodotus as Pericles and Anaxagoras are
undoubted*'in all essential respects" a coutempo- ly his ''older
contemporaries," but their rary of Thucydides (p. 361), and even of
minds were formed at Athens, not at HaAristophanes (p. 353). This
is unfair, licarnassus. In the rapid development Thucydides probably
outlived Herodotus of Greek mental life after the repulse of som^e
25 or 30 years, and wrote his His- Xerxes, Athens took the lead, and
soon tory towards the close of his life — after shot far ahead of
every other state ; while B.C. 404. (See Thucyd. i. 21-3; ii. 65;
Halicarnassus, one of the outlying porsub fin. ; V. 26.) Aristophanes
was born tious of the Grecian world, would be after Herodotus had
recited at Athens, among the last to receive the impidse in B.C. 444
probably (Schol. Ar. Ran. propagated from a far-off centre. Hero502,
Arg.Eq.), and only began to exhibit dotus, however, was certainly
behind, about the time of our author's death (in while Pericles and
Anaxagoras wei'e beB.c. 427, Herodotus dying probably in fore the
age. B.C. 425). These writers belong therefore 2 j^^y ^jj^ 3^3.
j^j-^^ 2, 20; xliii. 13 to the generation succcedimj Herodotus, xlv.
15, &c.
Writings. OKACLES— DREAMS. 73 by their quaintness and "
frivolity," ^ but they are in no way interwoven with the narrative, so
that it should stand or fall with them. Omit the swarming of the
snakes in the suburbs of Sardis, and the flocking of the horses from
their pastures to eat them before the capture of that city, and the
capture itself — nay, even the circumstances of the capture — are
untouched by the omission. And this remark extends beyond the
prodigies proper to omens, dreams, and even divine appearances.
Subtract the story of Epizelus from the account of the battle of
Marathon, or that of Pan and Pheidippides from the circumstances
preceding it, and nothing else need be struck out in consequence.
\This cannot indeed be said of the oracles, or of the dreams in some
instances ; on them the narrative occasionally hinges, and we are
reduced to the alternative of rejecting large portions of the story as
told by our author, or accepting his facts and explaining them on our
own principles. Even if we are sceptical altogether as to the
prophetic power of the oracles,* or as to any divine warning being
given to the heathen in dreams,^ we may still believe that events
happened as he states them, explaining, for instance, the visions of
Xerxes and Artabanus by a^ plot in the palace, and the oracles
concerning Salamis by the foresight of Themistocles. Cases,
however, of this kind, where the supposed supernatural
circumstance forms a leading feature in the chain of events, are
rare, amounting to not more than four or five in the entire work.^ It
is also worthy of notice that the supernatural circumstances are
more 3 Mure, p. 362. Fathers, that the oracles were inspired. ^ Col.
Mure speaks somewhat con- (See Euseb. Pi-rep. Ev. books v, and vi.
: temptuously of those "pious persons Clem. Alex. Strom, v. p. 728 ;
Theodoret. who incline to believe in the reality of Therap. Serm. x.
p. 623, &c. ; Augustin. a demoniac inspiration having been for de
Divin. Da)mon. Op. vi. p. 370, et some wise purpose conceded by
the ttue seqq. &c.) God to the Delphic Apollo " (1. s. c.) ; ^ The
dreams of Pharaoh, Abimelech, but he brings no ai-gument against
them ^Nebuchadnezzar, Pilate's wife, and Cor except that certain
oracles — or rather a nelius, are indications that the belief of single
oracle, for his reference to Herod, the Greeks in the occasional
inspiration ix. 43 is mistaken — which were not ful- of dreams, which
was at least as old as filled in our author's time, remain unful-
Homer — koI yap r ovap e'/c Ai6s iariv. filled to the present day. But
no one ever II. i. 63 — had a foundation in fact, supposed that all
the oracles delivered <5 The dream of Astyages concerning his at
Delphi or other places were inspired, daughter Mandane' — the
satisfaction by Those who deny any demoniac influence the Delphic
oracle of the test offered by to the oracular shrines have to explain
— Croesus — the visions of Xerxes and Arta1. The passage of the
Acts referred to banus — and the famous oracle concern below (note
^ on Book i. ch. 48) ; 2. The ing the wooden wall and Siilamis, are
alfact of the defect of oracles soon after most the only points in the
supernatural the publication of Christianity (Plut. de machinery on
which any extent of nai"Defect. Or. vol. ii. pp. 431-2) ; and 3. The
rative can be said to turn, general conviction of the early Christian
74' FAINT TRACES OF EATIONALISM. Life and numerous,
more prominent, and more inexplicable on rational grounds in the
portion of the work which treats of remoter times and less well
known countries. Without disappearing altogether, they become
more scanty as we approach nearer to Herodotus's own age, and to
the events which form the special subject of his History. Thus their
interference is mainly with those parts of the History of which the
authority is even otherwise the weakest, and becomes trifling when
we descend to those times concerning which our author had the
best means of obtaining information. The mode, however, in which
our author's belief in this sort of supernatural agency is supposed to
have most seriously detracted from his historical value is by the
influence it is thought to have exercised upon the choice which he
often had to make among various versions of a story coming to him
upon tolerably equal authority.^ It is argued that he would be likely
to prefer the version which dealt most largely in the supernatural
element, thus reversing the canon of criticism on which a modern
would be apt to proceed. Nor can it be denied that this may
sometimes have been the case. . The supernatural, especially if
removed a little from his own time, did not shock him, or seem to
him in the least improbable. He would therefore readily accept it,
and he would even, it must be allowed, be drawn to it as a means of
enlivening his narrative. It is however unfair to represent him as "a
man morbidly intent on bringing all the affairs of life into connexion
with some special display of divine interposition." On more than one
occasion he rejects a supernatural story or explanation, preferring to
it a plain matter-of-fact account. He suggests that when after three
days of violent storm, during which the Magi strove to appease the
wind by incantations and sacrifices, the tempest at last ceased, it
was not so much their sacred rites which had the desired effect as
that the fury of the gale was spent.^ He declines to accept the
Athenian account of the flight of Adeimantus from Salamis, though it
includes the prodigy of a phantom ship.^ He refuses credit to the
story that Cyrus was suckled by a bitch.^ His appetite for the
supernatural is therefore not indiscriminate ; and perhaps if we
possessed the complete works of his contemporaries we should find
him far oftener ' Mure, p. 360. ^ Herod, vii. 191. what might be
called a rationalising ten^ Ibid. viii. 94. Comp. v. 86. dency are ii. 57
and vii. 129 ad fin. 1 Ibid. i. 122. Further instances of
Writings. RELIGIOUS FEELINGS OF THE GREEKS. 75 than
has been suspected preferring a less to a more marvellous story.^
There is one other point of view in which the credulity of Herodotus
with respect to oracles, prodigies, &c., requires to be considered
before we absolutely pronounce it a very serious defect in him as an
historian. Granting that it detracts somewhat from his value as an
authentic narrator of facts, has it not a compensatory advantage in
placing him more on a level with the mass of his countrymen, in
enabling him to understand and portray them better, and inducing
him to put more fully upon record a whole class of motives and
feelings which did in point of fact largely influence their conduct ?
Would the cold scepticism of Thucydides have given us a truer
picture of the spirit in which the Persian attacks were met, — the
hopes that stimulated, and the belief that sustained a resistance
almost without a parallel, which may have been mere patriotism in
the leaders, but in the mass was certainly to a great extent the fruit
of religious enthusiasm ? Is it not a fact that the Greeks of the age
immediately preceding Herodotus were greatly influenced by oracles,
omens, prodigies, and the like, and are we not enabled to
understand them better from the sympathising pages of a writer
who participated in the general sentiment, than from the disdainful
remarks of one who from the height of his philosophical rationalism
looks down with a calm contempt upon the weakness and credulity
of the multitude ? At any i:ate, is it not a happy chance which has
given us_, in the persons of the two earliest and most eminent of
Greek historians, the two opposite phases of the Greek mind,
religiousness bordering upon superstition, and shrewd practical
sense verging towards scepticism ? Without the corrective to be
derived from the work of Herodotus ordinary students would have
formed a very imperfect notion of the real state of opinion among
the Greeks on religious matters, and many passages of their history
would have been utterly unintelligible.^ It seems therefore not too
much 2 It is not quite clear what sort of wonderful and supernatural
pla3'ed a "exaggerations "those were which caused more important
part than he assigns to Herodotus to reject three accounts which
them. Instances are, the story of Gyges, he had heard of the early
history of as told by Plato (Rep. ii. pp. 359, 360), Cyrus (i. 95).
Probably, however, they the narrative of the Persian retreat
conincluded a number of marvellous details, tained in iEschylus
(Pers. 497-5U9 ), and, like the suckling by a bitch, which he
probably, the history of the first Persian expressly discredits. It is
certain that expedition under Mardonius, as Charon there were often
accounts current among gave it. (Fr. 3; cf suprh,, p. 37.) tlie Greeks
of transactions included with- ^ As the ferment consequent upon the
in the sphere of his History, wherein the mutilation of the Mercuries,
which led
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!
textbookfull.com