Skip to content
This repository has been archived by the owner on Oct 9, 2018. It is now read-only.

Decrease line lengths by one #12

Merged
merged 1 commit into from
Jul 8, 2014
Merged

Conversation

chris-morgan
Copy link
Member

Although people speak of 80, 79 is actually the number they mean, because terminals will tend to need an extra, blank line if you write 80-character-wide lines.

These changes are in line with PEP 8’s recommendations:

Limit all lines to a maximum of 79 characters.

Some teams strongly prefer a longer line length. For code maintained exclusively or primarily by a team that can reach agreement on this issue, it is okay to increase the nominal line length from 80 to 100 characters (effectively increasing the maximum length to 99 characters), provided that comments and docstrings are still wrapped at 72 characters.

(We can deal with its docstrings 72 characters at another time; the wisdom of it is much more debatable.

@nathantypanski
Copy link
Contributor

Isn't the general Rust convention "hard limit at 120 columns; soft limit at
80" - so suggesting 80 as the hard limit is perhaps too strict?
On Jul 3, 2014 9:46 PM, "Chris Morgan" notifications@github.com wrote:

Although people speak of 80, 79 is actually the number they mean, because
terminals will tend to need an extra, blank line if you write
80-character-wide lines.

These changes are in line with PEP 8’s recommendations:

Limit all lines to a maximum of 79 characters.

Some teams strongly prefer a longer line length. For code maintained
exclusively or primarily by a team that can reach agreement on this issue,
it is okay to increase the nominal line length from 80 to 100 characters
(effectively increasing the maximum length to 99 characters), provided that
comments and docstrings are still wrapped at 72 characters.

(We can deal with its docstrings 72 characters at another time; the wisdom

of it is much more debatable.

You can merge this Pull Request by running

git pull https://github.com/chris-morgan/rust-guidelines patch-1

Or view, comment on, or merge it at:

#12
Commit Summary

  • Decrease line lengths by one

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#12.

@nathantypanski
Copy link
Contributor

Er nvm - reading the commit details I see there's a hard limit at ~100,
soft limit at 80. I agree with this commit: 79 is an "80 column wrap" and
99 is a proper "100 col wrap".

@aturon
Copy link
Member

aturon commented Jul 8, 2014

Thanks @chris-morgan. As a heads up, discussion with the core team suggests that the soft limit/hard limit setup here is probably going away, in favor of something like a fixed 99 character limit.

If you change this to just state a 99 character limit, I'll merge it :-)

It was decided to ditch the soft 80/hard 100 in favour of just 100.

Now although people speak of figures like 80, 79 is actually the number
they mean, because terminals will tend to need an extra, blank line if
you write 80-character-wide lines.

This is reflected in PEP 8:

> Limit all lines to a maximum of 79 characters.

> …

> Some teams strongly prefer a longer line length. For code maintained exclusively or primarily by a team that can reach agreement on this issue, it is okay to increase the nominal line length from 80 to 100 characters (effectively increasing the maximum length to 99 characters), provided that comments and docstrings are still wrapped at 72 characters.

Therefore, having decided to go with 100, we’re actually going with 99.
aturon added a commit that referenced this pull request Jul 8, 2014
Decrease line lengths by one
@aturon aturon merged commit d978b0a into rust-lang:master Jul 8, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants