C++ Crash Course: a fast-Paced Introduction


A C K N O W L E D G M E N T S



Yüklə 7 Mb.
Pdf görüntüsü
səhifə21/71
tarix20.09.2023
ölçüsü7 Mb.
#145939
1   ...   17   18   19   20   21   22   23   24   ...   71
C Crash Course A Fast-Paced Introduction by Josh Lospinoso

A C K N O W L E D G M E N T S
Above all, I thank my family for giving me creative space. It took twice 
as long to write half of what I proposed, and for your patience I owe you 
immeasurably.
I’m indebted to Kyle Willmon and Aaron Bray, who taught me C++; to 
Tyler Ortman, who shepherded this book from a proposal; to Bill Pollock, 
who rehabilitated my expositive style; to Chris Cleveland, Patrick De Justo
Anne Marie Walker, Annie Choi, Meg Sneeringer, and Riley Hoffman, 
whose top-notch editing benefited this book enormously; and to the many 
early readers who transmuted raw chapters into inestimable feedback. 
And finally I thank Jeff Lospinoso, who bequeathed to his wide-eyed, 
ten-year-old nephew the well-thumbed, coffee-stained Camel Book that 
ignited the spark.



I N T R O D U C T I O N
The demand for system programming
is enormous. With the ubiquity of web 
browsers, mobile devices, and the Internet 
of Things, there has perhaps never been a bet-
ter time to be a system programmer. Efficient, main-
tainable, and correct code is desired in all cases, and 
it’s my firm belief that C++ is the right language for 
the job in general.
In the hands of a knowledgeable programmer, C++ can produce 
smaller, more efficient, and more readable code than any other system
programming language on the planet. It’s a language committed to the 
ideal of zero-overhead abstraction mechanisms—so your programs are fast 
and quick to program—as well as simple, direct mapping to hardware— 
so you have low-level control when you need it. When you program in C++, 
you stand on the shoulders of giants who have spent decades crafting an 
incredibly powerful and flexible language.
Grab the ol’ brush and paint along with us. 
—Bob Ross


xxxii
Introduction
A huge benefit of learning C++ is that you gain access to the C++ 
Standard Library, the stdlib, free of charge. The stdlib is composed of three 
interlocking parts: containers, iterators, and algorithms. If you’ve ever written 
your own quicksort algorithm by hand or if you’ve programmed system code 
and been bitten by buffer overflows, dangling pointers, use-after frees, and 
double frees, you’ll enjoy getting acquainted with the stdlib. It provides you 
with an unrivaled combination of type safety, correctness, and efficiency. In 
addition, you’ll like how compact and expressive your code can be.
At the core of the C++ programming model is the object life cycle, which 
gives you strong guarantees that resources your program uses, such as files, 
memory, and network sockets, release correctly, even when error conditions 
occur. When used effectively, exceptions can clean out large amounts of error-
condition-checking clutter from your code. Also, move/copy semantics pro-
vide safety, efficiency, and flexibility to manage resource ownership in a way 
that earlier system programming languages, like C, simply don’t provide.
C++ is a living, breathing language; after more than 30 years, the 
International Organization for Standardization (ISO) committee for C++ 
regularly makes improvements in the language. Several updates to the stan-
dard have been released in the past decade: C++11, C++14, and C++17, which 
were released in 2011, 2014, and 2017, respectively. You can expect a new 
C++20 in 2020.
When I use the term modern C++, I mean the latest C++ version that 
embraces the features and paradigms presented in these additions. These 
updates have made serious refinements to the language that improve its 
expressiveness, efficiency, safety, and overall usability. By some measures, 
the language has never been more popular, and it’s not going away any 
time soon. If you decide to invest in learning C++, it will pay dividends
for years to come.

Yüklə 7 Mb.

Dostları ilə paylaş:
1   ...   17   18   19   20   21   22   23   24   ...   71




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin