Open brace placement: always on the same line?

These rules do indeed not contradict each other and may well be consistent.

I think I see a problem with that consistency here – namely, with a line limit like 99 character and line continuations rules that have >4 indent, we can pretty quickly get to the right border.

I’ve hit that case a few times with my code, and this is why I read this proposal and thought it was pretty good, as it does IMO not sacrify readability, keeps shortness for the common case and IMO even makes the many parameters block more readable.

1 Like

I think I disagree here. I wouldn't sacrifice what is readability to me, for consistency.

(The PEP8 quote about consistency comes to my mind when reading that we should pursue consistency for the sake of it.)

The move towards RAII in Rust was primarily motivated by a desire to get rid of rightward drift. This is also one of the primary motivating factors of my if-let RFC. No matter what the style rules are, rightward drift is generally considered bad and should be avoided when possible.

Also, I don't see what rightward drift has to do with the placement of the open brace.

I think it was also that closures didn’t compile as fast or well as hoped, and made coding harder by involving borrowing into closures for scoping a lot more.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.