3 ms·
> I had to re-align all the code: Cannot you just have your editor do that for you?
by ethelward 8y ago
> I had to re-align all the code:
Cannot you just have your editor do that for you?
- Stratoscope 8y agoIt was about 25 years ago that I stopped using alignment, and the editors I was using didn't have that kind of auto-formatting. But there was more to it: I realized that I didn't like column alignment any more. It didn't make the code any more readable, and in many cases it made it less readable. A more recent example of a group that abandoned alignment is the Rust and Servo teams at Mozilla. Their code style used to look like this: let mut rewrites = try_opt!(subexpr_list.iter() .rev() .map(|e| { rewrite_chain_expr(e, total_span, context, max_width, indent) }) .collect::<Option<Vec<_>>>()); A year or so ago they changed to a purely indentation-based style: let mut rewrites = try_opt!( subexpr_list .iter() .rev() .map( |e| { rewrite_chain_expr( e, total_span, context, max_width, indent ) }) .collect::<Option<Vec<_>>>() ); They found this style to have advantages over alignment, perhaps for some of the same reasons that I prefer it.