[ros-dev] [ros-diffs] [hbelusca] 58902: [FREELDR] - Fix some function parameter types, so to avoid unuseful casts (from pointers to const strings to pointers to strings in particular). - The big thing: make FreeLdr load...
Sven Barth
pascaldragon at googlemail.com
Thu May 2 10:10:40 UTC 2013
Am 02.05.2013 00:30, schrieb Timo Kreuzer:
>
> I have an actual pragmatic argument against one liners:
> When you debug code (and I mean with a real debugger aka WinDbg and
> not kdbg) and you step through the source, whenever there is a one
> liner, you just don't see which branch it takes and whether it
> executed the statement or not. So you have to check other things. Look
> at the variables. And when there is stuff like
> "if (FOO_MACRO(Value)) GlobalVariable++;" you are simply f***ed.
> You'll have to add a watch for GlobalVariable and check the value
> before and after.
> I really prefer to see what path the code takes, when stepping over it.
>
> So it's not a question of style or beauty, but a question of
> convenient debugging.
This is also the reason why I don't like to put a statement in the same
line as a if/while-condition or for-loop-header no matter what
programming language I'm using.
Regards,
Sven
More information about the Ros-dev
mailing list