Extra space in argument list
Some programmers feel that using extra spaces within parentheses - as in ( this ) instead of (that) - slightly increases the legibility of code. However, this style doesn't seem to be very common.
Example
import java.util.*; /** * When using parentheses, extra spaces may be used to slightly * increase legibility. Here, both styles are illustrated for comparison. */ public final class ExtraSpace { public void explode( String aThing ) { expand( aThing ); //with extra spaces burst(aThing); //without extra spaces } // PRIVATE private static final String fBALLOON = "balloon"; private static final String fTIRE = "tire"; private void expand( String aThing ){ if ( aThing.equals( fBALLOON ) ) { //with extra spaces //..elided } else if (aThing.equals(fTIRE)){ //without extra spaces //..elided } else { //..elided } } private void burst( String aThing ){ //with extra spaces //..elided } }
Would you use this technique?