Hacker News new | past | comments | ask | show | jobs | submit login

Regarding writing "one-sentence-per-line", I've noticed that style before in LaTeX. While I don't use that style, one advantage that I like is the ability to include comments on the sentence level in LaTeX.

So instead of this:

  First sentence. Second sentence. % Comment on first sentence.
I can write:

  First sentence. % Comment on first sentence.
  Second sentence.
(Of course, one could define a new TeX macro that doesn't display anything to add comments anywhere in-line. That's not as readable, though.)

I've also read that one-sentence-per-line works better with diff programs, but I haven't had any problems with the program meld, so this isn't convincing to me. The advantage the linked article mentions in terms of rearranging sentences also is worth considering, though I haven't found the normal way to be that bad so I'm not convinced by that either.

Some other links on this coding/writing style:

https://rhodesmill.org/brandon/2012/one-sentence-per-line/

https://news.ycombinator.com/item?id=4642395

http://www.uvm.edu/pdodds/writings/2015-05-13better-writing-...




I've been working on turning a pretty massive scanned book into a git repo of markdown files, with multiple collaborators. Using sentence-per-line has been useful (compared to line-per-paragraph) because, even with / despite --word-diff , PRs are far more concise, and merge conflicts are more rare. From memory, with paragraph-per-line, I think a series of paragraphs, each changed, even with minor changes, kinda breaks git diff and GitHub diff.


Oh, wow... I hadn't even thought of the diff angle, but it makes all the sense in the world. I've heard some authors even start each clause on its own line. I'm not sure I'm ready for that yet.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: