Humans are adept at parsing natural language so it's a good thing to strive to utilize that for writing code.
I feel a bit hesitant to assert that we should strive to match natural language fully, as there is power in succinctness and abstraction
How do you balance succinctness and readability?
You want your prose to be terse in this context.
Succinctness is good when it is accomplished by rising level of abstraction/syntax
It is not so great when accomplished by omitting details in a way that makes code structure less explicit?
For example when it hides temporal coupling between functions
public class MoogDiver {
Gradient gradient;
List<Spline> splines;
public void dive(String reason) {
saturateGradient();
reticulateSplines();
diveForMoog(reason);
}
…
}
reticulateSplines
before saturateGradient was called, leading to an UnsaturatedGradientException
. A better solution is: public class MoogDiver {
Gradient gradient;
List<Spline> splines;
public void dive(String reason) {
Gradient gradient = saturateGradient();
List<Spline> splines = reticulateSplines(gradient);
diveForMoog(splines, reason);
}
…
}