[Nfd-dev] code-style: line width

Junxiao Shi shijunxiao at email.arizona.edu
Fri Feb 27 18:31:40 PST 2015


Dear folks

By doing so you are imposing implicit rules. It's bad to have any implicit
rule.

I suggest amending this rule as:

Line width generally should be within 100 columns, and must not exceed 130
columns.
Exception: An URI longer than 130 columns should be kept on one line so
that it can be copied in its entirety.

Yours, Junxiao
On Feb 27, 2015 7:21 PM, "Alex Afanasyev" <alexander.afanasyev at ucla.edu>
wrote:

> 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 --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20150227/c97b4a20/attachment.html>


More information about the Nfd-dev mailing list