Program Failure

We should pay some more attention to the notion of program failure, as it's very important. The first question, of course, is what it means to say that a program “fails”. A valid answer is that it doesn't work correctly, but that isn't very specific.

As you can imagine, this notion was the topic of some discussion with Susan:

Susan: What do you mean by a program failing? I know it means it won't work, but what happens? Do you just get error messages, and it won't do anything? Or is it like the message that you have on page 188?

Steve: In general, a program “failing” means that it does something unexpected and erroneous. Because I have put some safety features into the implementation of Vec, you'll get an error message if you misuse ...

Get C++: A Dialog Programming with the C++ Standard Library now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.