trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: January 2015

Re: [trinity-devel] Codebase formatting discussion

From: Slávek Banko <slavek.banko@...>
Date: Sat, 17 Jan 2015 15:59:19 +0100
On Friday 09 of January 2015 23:33:01 Timothy Pearson wrote:
> >> Also on the docket are how to handle simple variable assignments; there
> >> are several ways I've seen: a=2; a = 2; a=
> >> 2; a =2;
> >>
> >> I'm fairly undecided on this.  For consistency with larger statements "a
> >> = 1;" should probably be used but it seems
> >> such a waste of space compared with "a=1;".  Thoughts?
> >
> > Both "a=1" and "a = 1" are fine for me. For long time I used the first
> > way, but in the last couple of years I switched
> > ti the second one: usually more readable for simple expressions but can
> > become confusing with long and complex ones
> > such as:
> > if ((a = 2) && (++b != (c + (x * y) / f(q,w,e))))
> > Choice is up to you and Slavek.
>
> I'm going to lean towards forcing spaces for consistency.  What is your
> opinion Slavek?

Yes, with spaces - in my view certainly readable.

-- 
Slávek