[Nfd-dev] code-style: line width

Alex Afanasyev alexander.afanasyev at ucla.edu
Fri Feb 27 18:21:24 PST 2015


I personally, do not want to make changes for the the rule we have.  The current rule states:

  - Lines should be within a reasonable range. Lines longer than 100 columns should generally be avoided.

This rule was meant to be guideline and it still holds.  I would like to see lines to be mostly within 100 columns, as it is more convenient.  It doesn't preclude lines to be longer and doesn't require any justification to be put inside the code.  During the code review we can ask why line is longer or suggest to shorten it, but this is not something that worth having conversation for a long time (as we do now).

---
Alex

> On Feb 27, 2015, at 4:59 PM, Davide Pesavento <davide.pesavento at lip6.fr> wrote:
> 
> As a hard limit, 130 sounds acceptable to me. Although if you're doing
> side-by-side diffs/merges, or editing in two vertically-split panes,
> 130 is way too much. Therefore I think we should still encourage
> staying below 100 columns (or even 80), unless line wrapping in that
> point makes the code really harder to read.
> 
> Best,
> Davide
> 
> On Sat, Feb 28, 2015 at 1:33 AM, Junxiao Shi
> <shijunxiao at email.arizona.edu> wrote:
>> Dear folks
>> 
>> ndn-cxx code style currently states that line width SHOULD be limited to 100
>> columns.
>> This matter has been disputed in several recent code reviews.
>> Sometimes I'm also struggling to satisfy this requirement.
>> 
>> I suggest amending the rule to set 130 columns as a hard limit.
>> 132 columns is a common terminal width, but two columns should be reserved
>> for 'diff'.
>> 
>> What do others on this mailing list think?
>> 
>> Yours, Junxiao
>> 
>> 
>> _______________________________________________
>> Nfd-dev mailing list
>> Nfd-dev at lists.cs.ucla.edu
>> http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev
>> 
> _______________________________________________
> Nfd-dev mailing list
> Nfd-dev at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20150227/da057350/attachment.bin>


More information about the Nfd-dev mailing list