Remix.run Logo
jitl 4 days ago

every editor can wrap text these days. good ones will even indent the wrapped text properly

giveita 4 days ago | parent | next [-]

Thats a slippery slope towards storing semantics and displaying locally preferred syntax ;)

jitl 4 days ago | parent | next [-]

I 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.

Cthulhu_ 4 days ago | parent | prev | next [-]

And 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.

NL807 4 days ago | parent | prev | next [-]

And the bikeshedding has begun...

thfuran 4 days ago | parent | next [-]

Who’s going to be bikeshedding (about formatting) when everyone can individually configure their own formatting rules without affecting anyone else?

giveita 4 days ago | parent | prev | next [-]

What's the nuclear reactor in this analogy?

pferde 4 days ago | parent [-]

That 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.

virtue3 4 days ago | parent | prev [-]

was going to say the same thing.

Boy that was fast.

bogomog 3 days ago | parent | prev | next [-]

That's why Python should have gone all-in on significant spaces: tabs for blocks, spaces after tabs for line continuation

DemocracyFTW2 3 days ago | parent [-]

Mixing spaces and tabs is a surefire way to ruin everything.

rightbyte 3 days ago | parent | prev [-]

Is this a subtle pro-tab pinch?

rTX5CMRXIfFG 4 days ago | parent | prev | next [-]

You 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.

hulitu 4 days ago | parent | prev [-]

> every editor can wrap text these days.

could. Yesterday notepad (win 10) just plainly refused.

jitl 4 days ago | parent [-]

Windows is so weird