Hidden Temporal Couplings

When the order/structure of calling functions matters, it should be explicitly required that they are called in that order.

public void dive(String reason) {
  saturateGradient();
  reticulateSplines();
  diveForMoog(reason);
}

vs

public void dive(String reason) {
  Gradient gradient = saturateGradient();
  List<Spline> splines = reticulateSplines(gradient);
  diveForMoog(splines, reason);
}

The latter enforces the order in which the functions are called due to their arguments, which is good.



bj 2019-09-22