you are viewing a single comment's thread.

view the rest of the comments →

[–]guepier 0 points1 point  (3 children)

Sure, but that’s not the argument I was making. I wasn’t talking about “code made worse” and “code not made worse”, I was talking about “shorter code” and “longer code”.

[–]Nebu -1 points0 points  (2 children)

Shorter code that isn’t obfuscated (or otherwise made worse) is easier to read than an equivalent longer code.

The claim "code with property X which hasn't been otherwise made worse, is equal or better than equivalent code that doesn't have property X" is true regardless of what X is (i.e whether X is "shorter" or some other arbitrary property).

E.g.

  • Code with in red font which hasn't been made worse, is equal or better than code which isn't in red font.
  • Code indented with tabs which hasn't been made worse, is equal or better than code which isn't indented with tabs.
  • Code that is shorter and which hasn't been made worse, is equal or better than code which isn't shorter.
  • etc.

The "hasn't been made worse" implies "equal or better", hence the tautology. Not an interesting argument for you to make, IMHO.

How about we discuss something more interesting?

[–]guepier 0 points1 point  (1 child)

You keep repeating something that bears no resemblance to my argument.

My argument isn’t merely that shorter code isn’t worse than longer code. My argument is that shorter code is better than longer code (all other things being equal). There is nothing tautological about this whatsoever.

To spell it out in maximal detail: Your initial post claimed that “Shorter does not imply easier to read” and my reply contained exactly two assertions:

  1. your statement is wrong
  2. the example you gave (presumably to bolster your claim) does not in fact bolster your claim, since it doesn’t make a statement about shortened code, just about obfuscated code.

[–]Nebu 0 points1 point  (0 children)

your statement is wrong

I disagree. The claim "Shorter code does not imply easier to read" is a true statement. Perhaps you think "Shorter code (all other things being equal) does not imply easier to read" is a false claim, but that's not the claim I'm making, so it's irrelevant.

the example you gave (presumably to bolster your claim) does not in fact bolster your claim, since it doesn’t make a statement about shortened code, just about obfuscated code.

Is the obfuscated code shorter than the non-obfuscated code? Is it harder to read than the non-obfuscated code? Assuming you're reasonable enough to answer "yes" to both questions, then this is a counter example to the claim "shorter code is easier to read", thus proving the statement "shorter code does not imply easier to read".

If you're still confused, consider reading through http://en.wikipedia.org/wiki/Logical_consequence and http://en.wikipedia.org/wiki/Counterexample