News for hackers. Stuff that matters.
Re:Formatting code should be unnecessary by giveita on Monday September 08, 2025 @12:43AM (#45164697)
Thats a slippery slope towards storing semantics and displaying locally preferred syntax ;)
Re:Formatting code should be unnecessary by jitl on Monday September 08, 2025 @12:51AM (#45164727)
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.

Re:Formatting code should be unnecessary by NL807 on Monday September 08, 2025 @01:03AM (#45164781)
And the bikeshedding has begun...
Re:Formatting code should be unnecessary by giveita on Monday September 08, 2025 @03:36AM (#45165553)
What's the nuclear reactor in this analogy?
Re:Formatting code should be unnecessary by pferde on Monday September 08, 2025 @03:48AM (#45165625)
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.
Re:Formatting code should be unnecessary by virtue3 on Monday September 08, 2025 @02:55AM (#45165340)
was going to say the same thing.

Boy that was fast.

Re:Formatting code should be unnecessary by thfuran on Monday September 08, 2025 @08:54AM (#45167666)
Who’s going to be bikeshedding (about formatting) when everyone can individually configure their own formatting rules without affecting anyone else?
Re:Formatting code should be unnecessary by Cthulhu_ on Monday September 08, 2025 @05:17AM (#45166182)
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.

Re:Formatting code should be unnecessary by rightbyte on Monday September 08, 2025 @04:33PM (#45173599)
Is this a subtle pro-tab pinch?
Re:Formatting code should be unnecessary by bogomog on Monday September 08, 2025 @06:06PM (#45174655)
That's why Python should have gone all-in on significant spaces: tabs for blocks, spaces after tabs for line continuation
Re:Formatting code should be unnecessary by DemocracyFTW2 on Tuesday September 09, 2025 @01:11AM (#45177655)
Mixing spaces and tabs is a surefire way to ruin everything.