On 9/19/17 5:09 PM, Ehsan Akhgari wrote:
Do you find the arguments that people have against this convincing?
No.
If not, would you mind elaborating why please?
Sure, to recap, the arguments against aligned params in this thread are:
1. more work
Not an issue if we use a tool to do the formatting.
Even manually, I think it's minor work that I'm willing to do for
the benefit of the readers of our code.
2. touching more lines than necessary when adding/removing params,
making it harder to follow blame links
Judging from my personal use of blame links, it's very rare that
I want to find when a specific param was added to a signature.
This is also something that tooling could solve (skip blame on
lines that differ only by whitespace).
3. more likely to lead to overly long lines that require wrapping
When that happens (even without aligning param names) the most common
solution I've seen is to simply move the whole param block to the next
line. Like so:
VeryLongFunctionNameOrWhatever...(
int aSomething,
void* aSomethingElse)
{
But, do we still believe that a 80-column hard limit makes sense in this
century?
I tend to think that we should relax it.
(BTW, it seems some modules already have -- I got a review comment today
to vertically align ".function()" on the dot in JS even if it overflows
80 columns).
I think improved readability trumps all of the minor issues above.
/Mats
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform