O'Reilly logo

Exceptional C++ Style 40 New Engineering Puzzles, Programming Problems, and Solutions by Herb Sutter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 37. Monoliths “Unstrung,” Part 1: A Look at std::string

Difficulty: 3

I've decided to conclude the Style Case Studies section somewhat impishly, with a miniseries targeting an example from the C++ standard library itself: std::string. We begin our critique with a review of an important design guideline and a contrasting overview of the standard string facility.

Solution

Avoid Unduly Monolithic Designs

  1. What is a monolithic class, and why is it bad? Explain.

The word “monolithic” is used to describe software that is a single, big, indivisible piece, like a monolith. The word “monolith” comes from the words “mono” (one) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required