Skip to Main Content
Software Essentials
book

Software Essentials

by Adair Dingle
July 2014
Intermediate to advanced content levelIntermediate to advanced
436 pages
12h 27m
English
Chapman and Hall/CRC
Content preview from Software Essentials
Appendix D 389
Even with fairly intuitive operations, such as addition, operator over-
loading in C++ may present design challenges. Why? When using tools,
such as compilers, programmers expect consistent use, compatible with
their experience and knowledge. Our initial design did not address implicit
assumptions about the broad use of addition. An experienced program-
mer expects a += b to be supported if a = a + b is supported. Also, if a=
a + 1 is a valid statement, then, for consistency, a++ and ++a should also
be valid. Even if one cannot remember the formal name, commutativity,
one expects that “a + b” yields the same value as “b + a.”
How does one design around the impasse of invoking a class method
through a literal? Recall that ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Software Architect’s Handbook

Software Architect’s Handbook

Joseph Ingeno
Economics-Driven Software Architecture

Economics-Driven Software Architecture

Ivan Mistrik, Rami Bahsoon, Rick Kazman, Yuanyuan Zhang
Software Architect Bootcamp

Software Architect Bootcamp

Raphael Malveau, Ph.D. Thomas J. Mowbray

Publisher Resources

ISBN: 9781439841204