4 ms·
The common advice[0] is to just write one sentence per line. I usually split at commas etc as well. Then use editor soft wrapping instead of fixing a maximum li
by pxeger1 3y ago
The common advice[0] is to just write one sentence per line. I usually split at commas etc as well. Then use editor soft wrapping instead of fixing a maximum line length - but if your lines get longer than the screen width that might be a sign your sentences are too complex.
[0]: anyone have a good source for this? I’m not sure where I first encountered it
- meatmanek 3y agohttps://news.ycombinator.com/item?id=31808093 https://news.ycombinator.com/item?id=31808093
- bpeebles 3y agohttps://rhodesmill.org/brandon/2012/one-sentence-per-line/ https://rhodesmill.org/brandon/2012/one-sentence-per-line/ is one possibility. And discusses a Kernighan Unix memo from 1974 advocating for the practice. "UNIX for Beginners" https://web.archive.org/web/20130108163017if_/http://miffy.tom-yam.or.jp:80/2238/ref/beg.pdf https://web.archive.org/web/20130108163017if_/http://miffy.t... (PDF)
- abdullahkhalids 3y agoI am not a slave of the machine. The machine is my tool. The machine will conform to what I want. Not the other way around. There is no philosophy more important in this age.
- antonvs 3y agoIn my work I encounter quite a few people beating their heads against walls trying to make the machine "conform to what they want". You can often achieve your goals much more quickly by using tools they way they best support being used.
- alpaca128 3y agoAnd often there is a middleground. In this case one could write a script that outputs a reformatted file with one sentence per line. In Vim this could even be a simple macro as the editor already has a key for jumping to the next sentence.
- sovietswag 3y agoIt turns out that there is a lot of discourse out there about "semantic newlines", under a few different names. So far the names I've seen are: - One Sentence Per Line (OSPL) - Semantic Line Breaks (SemBr) - Semantic Linefeeds - Ventilated Prose - Semantic newlines Reading through the pages below was helpful in getting a better idea of what language people use to discuss this. They're mostly historical retrospectives or arguments for the merit of semantic newlines. https://rhodesmill.org/brandon/2012/one-sentence-per-line https://rhodesmill.org/brandon/2012/one-sentence-per-line https://ramshankar.org/blog/posts/2019/semantic-line-breaks https://ramshankar.org/blog/posts/2019/semantic-line-breaks https://vanemden.wordpress.com/2009/01/01/ventilated-prose https://vanemden.wordpress.com/2009/01/01/ventilated-prose https://discuss.python.org/t/semantic-line-breaks/13874 https://discuss.python.org/t/semantic-line-breaks/13874 https://discuss.python.org/t/one-sentence-per-line-for-peps-and-more/13920 https://discuss.python.org/t/one-sentence-per-line-for-peps-... https://sembr.org https://sembr.org https://asciidoctor.org/docs/asciidoc-recommended-practices/#one-sentence-per-line https://asciidoctor.org/docs/asciidoc-recommended-practices/... (Actually I think one-sentence-per-line denotes something slightly different from semantic-line-breaks, not that I know what that difference is).
- rokkitmensch 3y agoI will write excessively complex sentences whenever I darn please, and will be hogtied before I stop at the whims of a /diff tool/. Mock outrage aside, whimsy and play in written language is vastly cheaper than in industrial programming environments. Provided, of course, the author can yet communicate while horsing around.
- lupire 3y agoDid you misunderstand? One sentence per line doesn't mean your sentence has to be limited in length.
- rokkitmensch 3y ago> but if your lines get longer than the screen width that might be a sign your sentences are too complex