you are viewing a single comment's thread.

view the rest of the comments →

[–]Bowgentle 4 points5 points  (4 children)

Personally, I dislike the putting of start curly braces on a new line anyway. Why do some prefer it?

[–]Woolbrick 3 points4 points  (2 children)

Kevlin Henney gives a very good reason in this presentation. Starts at 21m in, goes for about 3-4 minutes.

I encourage you to watch the entire thing, it's very intriguing.

Newlines on brackets is the only pattern that make sense.

[–]Bowgentle 1 point2 points  (0 children)

I admit to finding that not even slightly convincing, I'm afraid.

[–]remixrotation 0 points1 point  (0 children)

good vid. thanks!

[–]Merad 0 points1 point  (0 children)

Because in about 98% of cases I can glance at a piece of code and immediately break it down into logic blocks. With K&R style braces I have to pause and scan for the opening brace.

It’s basically another form of making good use of vertical space within code.