Tabs do make this slightly easier to implement, but indentation by a consistent number of spaces is no different from indentation by one tab: both can be translated by the editor to as many columns of indentation as you would like. This can only be done if the leading spaces per indent are consistent, which zig fmt
provides.
Ease of implementation is basically irrelevant, since all editors I’m aware of are able to widen or narrow indentation, whether tabs are used, or whether a spaces-per-indent is defined for the format. It doesn’t matter at all. There’s nothing stopping any of you from changing your editor to display Zig indentation as 8 columns, or 2.
Similarly, given that spaces for indent are the more common modern style, I’m rather sure that screen readers designed for code can account for either style of indentation. If not, the developers are failing their users, and should fix that.
The reason I prefer spaces is because two invisible marks, one of them of variable width, has always been a rather awkward thing. The tab key is either a navigation and indentation button, or it is that but it inconsistently uses \t
to provide that indentation, and I prefer the former.
But this barely matters in the last couple of decades, because editors can, and are, configured to handle this whole mess consistently.
There’s also the flip side of configurability: while editors can be configured to display either tabs or spaces however one would like, renderers, such as the one GitHub uses for fenced code blocks, frequently cannot be. Which is fine if you wanted your tabs to be eight spaces, but I personally find that excessive. With spaces, renderers display indentation precisely as the user intended it.