index

goals: fall through

Code that works without options.
struct Points { 
       Points(): dropFromTop(0), 
                 dropFromEnd(0) {} 
  int dropFromTop; 
  int dropFromEnd; 
  vector<Point>; 
}; 
// vs: 
//... 
           Points(): first(0), 
                     last (0) {} 
  int first; 
  int  last; //<--how to keep it synchronized? 
//...
In the example, setting dropFromEnd to zero means all the points get used. The option of using just some points is decoupled from the length of the list.

Code should work like train brakes, which turn on when they fail.

To initialize in a working state, without user- or coder- settings, constructors should need little information.

Enforce initialization with compile time errors and runtime tests.

nedwaves.com 2017 [171108]