Re: [ros-svn] [gdalsnes]18113:-reorderInsertXscendingOrder
macro argument order and update uses
psusi at cfl.rr.com
Wed Sep 28 23:12:15 CEST 2005
This is your bad assumption. I can write a sentence that is 12 words
and 100 characters long, or I can write it using only 6 words that are
50 characters long. If those 6 words aren't in common usage, then most
people won't understand it when they see it, and so it is harder to read
even though it is shorter.
To show another example in C, I can write:
if( condition1 )
if( condition2 )
if( condition 3 )
or I can write code that does the same thing, but is shorter:
condition1 && dosomething1(), condition3 ? dosomething3 : dosomething2();
Yes, the latter code is shorter, but the former is far easier to read
To try and steer this back to the original issue, the LIST_FOR_EACH
macro causes nonintuitive branching which is hard to understand when you
read it, and when working on the code, as Alex said, you often have to
demacrofy it which can introduce more errors. These are legitimate down
sides to using the macro, so again, you need a good reason to use it.
So far you seem to only keep insisting that the macros look better to
you, so I say again, pleasing your sense of aesthetics does not outweigh
the loss of maintainability.
Gunnar Dalsnes wrote:
> readability: writing (print or handwriting) that can be easily read.
> Im pretty sure its easier to read something if its less to read. By your
> definition, asm would give total readability;-P
More information about the Ros-dev