For example, to store whether sound is on, I have a boolean originally named "isSoundOn":
private boolean isSoundOn=true;
however, the default value of boolean is false, but I want my application to turn on the sound at start. My question is, should I change the name of isSoundOn into isMute, so that it becomes "false" correctly by default?
Or in general, should I keep a boolean be false by default, even if I may need to reconsider the name of boolean?
falsevalues to initialize their bools, prompting them to use more confusing "negative" variable names for features that should be on by default, e.g.bool isFeatureDisabled=false. Just like we wouldn't bat an eye atint someSetting=2500orstring textSetting="pretty", we should be perfectly comfortable with initializingisSomething=true.