logoalt Hacker News

teiferer • today at 8:10 AM • 1 reply • view on HN

In the age of auto-formatters, I have less and less sympathy for this point of view.

Any widely used formatter indents along semantics anyway, so why clutter your code with curly braces everywhere if stucture is clear from indentation? Might as well make it semantic.

Before auto-formatters, there was the occasional case where you could argue that some quick hack made something more readable, at the expense of less consistency and wasted time arguing about this in code reviews. But that ship has sailed, arguably rightfully so.

And that doesn't even bring the LLM angle. If code is generated by a machine anyway and you just review it, if even that, why still bash indentation as a semantic construct?


Replies

stackghost • today at 8:30 AM

If you have to run your source code through a formatter to make sure it doesn’t have mixed tabs and spaces that is not the flex you seem to think it is.

If you’re going to just have an LLM write all the code anyway why bother with a slow janky mess like python at all? Just make it write rust or java or go or literally anything.

Imagine having a magical machine that can write code in any programming language ever conceived, and you ask it to pick the language whose community thinks virtualenvs are a reasonable solution as opposed to a mark of profound shame. Couldn’t be me.