On Wed, 2011-05-11 at 12:48 +0200, [email protected]
wrote:
> > From: Philippe Gerum [mailto:[email protected]]
> > Sent: Wednesday, May 11, 2011 11:21 AM
> > ...
> > Also, let's avoid constructs like these:
> > 
> > >                       buf = iovec->iov_base, count = iovec++->iov_len;
> > 
> > Disk space is cheap so we can afford a few more characters per line;
> > ...
> 
> Could you please explain what you mean by this? I can imagine to put a few 
> more characters into the line above by changing it to
> 
>       buf = iovec->iov_base, count = iovec->iov_len, ++iovec;
> 
> but this would seem to contradict your recommendation below.

        buf = iovec->iov_base;
        count = iovec->iov_len;
        ++iovec;

One exec statement per line, no comma operator, no combined
post-incrementation and dereference to obfuscate the obvious, because we
don't care about a few more characters in the source code: we do want
readability. Plain, silly, massively non-imaginative obviousness of
constructs.

> 
> > In short, one executable statement per line is desired, our code should
> > have nothing to hide.
> 
> Since the above code line contains only one statement, I assume you mean one 
> assignment-expression, and will do accordingly.
> 
> By the way, what is your convention regarding goto?

Absolutely fine to use it for handling error paths sanely without code
duplication, and anywhere it would spare us weird games based on
obfuscated variable updates and tests only to control the code flow.

-- 
Philippe.



_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to