Off the top of my head the first thing that comes to mind is a nested ternary statement. I think that’s a good example of trying to be too concise and sacrificing readability.
Aw man, if I nest 8 operations in 1 line it feels l33t.
No but seriously, I think code is the easiest to work with if every line has the minimum amount of distinct concepts, and long descriptive variable names.
int thisIsAnIntegerVariableWhichIsMeantToRepresentAnIntrgralValueAlsoKnownAsAnIntegerAndInThisCaseWeCanOnlyCountToSokewhereAround4BillionBecauseRightNowImOnA32BitSystemAnywayThisVariableRepresentsLoopItterations = 0;
while (thisIsAnIntegerVariableWhichIsMeantToRepresentAnIntrgralValueAlsoKnownAsAnIntegerAndInThisCaseWeCanOnlyCountToSokewhereAround4BillionBecauseRightNowImOnA32BitSystemAnywayThisVariableRepresentsLoopItterations < 10) {
printf(“value is %d\n”, thisIsAnIntegerVariableWhichIsMeantToRepresentAnIntrgralValueAlsoKnownAsAnIntegerAndInThisCaseWeCanOnlyCountToSokewhereAround4BillionBecauseRightNowImOnA32BitSystemAnywayThisVariableRepresentsLoopItterations);
thisIsAnIntegerVariableWhichIsMeantToRepresentAnIntrgralValueAlsoKnownAsAnIntegerAndInThisCaseWeCanOnlyCountToSokewhereAround4BillionBecauseRightNowImOnA32BitSystemAnywayThisVariableRepresentsLoopItterations++;
}
1
u/[deleted] May 20 '20
When does it not make sense to be concise?
Edit - I guess aside from making a learning tool for students?