Closed jean closed 8 years ago
No semantic linebreaks.
Hey @jean, thanks for the PR! I've read through all of the changes and it looks good to me. I like the provided reasoning. One thing I would consider in future is to separate the formatting change pull request from the grammar fixes. But overall this is 👍.
Just for the record: Are you suggesting the wrap should occur at column 80? We should probably note it somewhere and keep it in mind for future.
Hi @zdne thanks for the merge :-)
Yes, I apologize for smuggling in the grammar fixes together with the format change.
Possibly the chosen line length (and other properties) can be noted by putting it in a .editorconfig
file and inviting contributors to use http://editorconfig.org/
I'm not personally that fussed about the chosen column. In fact my original PR proposed semantic linebreaks, i.e. break on clauses to make diffs maximally clear.
I don't like whitespace noise, e.g. reflowing a whole paragraph because one word was inserted.
I would reflow (gq<motion>
in Vim) just the line that grew too long (and maybe the next one, to end the short line on a natural break). And, if a reflow would cause a cascade, I wouldn't reflow if the edit exceeded the line length by less than say 10 characters.
In the Blueprint spec, I avoided breaking [links](long/link/target)
across lines.
In the end, it's about working on a file that edits nicely, generates readable diffs, and is comfortably readable without needing to be processed. I'm OK with requiring some judgement to maintain this state.
Wrap lines, it's more suited to a plaintext format like markdown.
For rendering, paragraphs don't need to be wrapped. But markdown uses a double-linebreak as paragraph separator so that paragraphs can be wrapped. As Gruber writes:
For me, this includes wrapping lines. A lot of source code, such as C or javascript, doesn't need wrapping either. But yet we do, for readability and better diffs.
Here's a markdown style guide that raises the same points (both pro and con): http://www.cirosantilli.com/markdown-style-guide/#line-wrapping