3 ms·
every editor can wrap text these days. good ones will even indent the wrapped text properly
by jitl 1y ago
every editor can wrap text these days. good ones will even indent the wrapped text properly
- hulitu 1y ago> every editor can wrap text these days. could. Yesterday notepad (win 10) just plainly refused.
- jitl 1y agoWindows is so weird
- giveita 1y agoThats a slippery slope towards storing semantics and displaying locally preferred syntax ;)
- jitl 1y agoI prefer storing plain text and displaying locally preferred syntax, to a degree. With some expressions, like lookup tables or bit strings, hand wrapping and careful white space use is the difference between “understandable and intuitive” and “completely meaningless”. In JS world, `// prettier-ignore` above such an expression preserves it but ideally there’s a more universal way to express this.
- NL807 1y agoAnd the bikeshedding has begun...
- virtue3 1y agowas going to say the same thing. Boy that was fast.
- giveita 1y agoWhat's the nuclear reactor in this analogy?
- pferde 1y agoThat the values could have been extracted to an array of structs, and iterated over in a small cycle that calls the function for each set of values.
- thfuran 1y agoWho’s going to be bikeshedding (about formatting) when everyone can individually configure their own formatting rules without affecting anyone else?
- Cthulhu_ 1y agoAnd that's fine, as long as whatever ends up in version control is standardized. Locally you can tweak your settings to have / have not word wrapping, 2-8 space indentation, etc. But that's the core of this article, too; since then it's normalized to store the plain text source code in git and share it, but it mentions a code and formatting agnostic storage format, where it's down to people's editors (and diff tools, etc) to render the code. It's not actually unusual, since things like images are also unreadable if you look at their source code, but tools like Github will render them in a human digestable format.
- rightbyte 1y agoIs this a subtle pro-tab pinch?
- bogomog 1y agoThat's why Python should have gone all-in on significant spaces: tabs for blocks, spaces after tabs for line continuation
- DemocracyFTW2 1y agoMixing spaces and tabs is a surefire way to ruin everything.
- rTX5CMRXIfFG 1y agoYou still have to minimize the wrapping that happens, because wrapped lines of code tend to be continuous instead of being properly spaced so as to make its parts individually readable.