I am of the opinion that we should follow the guidelines, unless they get
in the way of readability. In this case having things in one line makes it
very easy to see that b.x and b.y logic is same just y replaced with x. If
you do proper style, you loose that benefit. So on occasions I do break the
rule.


On Thu, Feb 13, 2014 at 9:24 AM, Victor Berchet <notifications@github.com>wrote:

> In demo/bouncing_balls/bouncy_balls.dart:
>
> >
> >      fps = (1000/delay).round();
> >      for(var i=0, ii=balls.length; i<ii; i++) {
> >        var b = balls[i];
> >        b.x += delay * b.velX;
> >        b.y += delay * b.velY;
> > -      if (b.x < 0) { b.x *= -1; b.velX *= -1; }
> > -      if (b.y < 0) { b.y *= -1; b.velY *= -1; }
> > -      if (b.x > width) { b.x = 2*width - b.x; b.velX *= -1; }
> > -      if (b.y > height) { b.y = 2*height - b.y; b.velY *= -1; }
> > +      if (b.x < 0) {
>
> If you're talking about the extra else... it's no more equivalent but it
> is now symmetric.
>
> If you're talking about all on the same line vs separated lines, we should
> have Dart specific CCs if we go this way otherwise anyone could use his own
> and the result will be messy. For now I try to apply Dart CCs.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mhevery/angular.dart/pull/6/files#r9717945>
> .
>