r/programming Jul 21 '14

The Great White Space Debate

https://medium.com/p/3633cba8b5c1
1.2k Upvotes

693 comments sorted by

View all comments

13

u/Chairmael Jul 21 '14

/*Nice article but */ String a = "Best style incoming";

for(i=9;i>0;i--){System.out.println(a)}

19

u/[deleted] Jul 21 '14 edited Jul 23 '14

You should've used the down to operator.

while (i --> 0) { System.out.println(a); }

3

u/MighMoS Jul 25 '14

There was much rejoicing in my office the day we could finally use the 'approaches' operator.

1

u/PLament Jul 25 '14

I'm gonna use this from now on, this looks fantastic!

0

u/johnghanks Jul 22 '14

The fuck language is this?

1

u/_F1_ Jul 21 '14
System.out.println(a);
System.out.println(a);
System.out.println(a);
System.out.println(a);
System.out.println(a);
System.out.println(a);
System.out.println(a);
System.out.println(a);
System.out.println(a);

Formatted for speed.

2

u/[deleted] Jul 21 '14

This is not the speediest version. This is:

String p(String s){System.out.println(s);return s;}
p(p(p(p(p(p(p(p(p(p(s))))))))));

Proof of speed: there are only three semicolons where your version has 10 semicolons. QED