| ▲ | stackghost 2 hours ago | |||||||
Semantic indentation is fundamentally an insane design. And I don't mean "insane" as a colloquialism for "dumb". I mean it is literally not a sane choice to make. English would make a horrid programming language, so being close to it is not a plus. | ||||||||
| ▲ | UltraSane 25 minutes ago | parent | next [-] | |||||||
Considering the endless arguments over C syntax I really don't see what is so weird about Python indentation. It has the nice effect of making code look a lot more consistent. | ||||||||
| ▲ | teiferer 2 hours ago | parent | prev [-] | |||||||
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? | ||||||||
| ||||||||