On 2014-09-11 19:42:43 -0500, Derek Martin wrote:
> On Thu, Sep 11, 2014 at 10:12:43AM -0700, Gary Johnson wrote:
> > I think that's just a matter of taste and what your used to.
I agree, but I just think that tab characters should never be used
for indenting. They can break alignment in diff output, and break
copy-paste under some conditions too.
> I don't. To some extent, yes... definitely. But some coding styles
> really do make code harder to read, and code that's harder to read is
> harder to understand.
>
> The GNU standard:
>
> - makes it harder to line up indented blocks visually, because the
> indent is too small to be easily distinguishable given many nested
> blocks (especially if they are not neatly balanced)
With the GNU coding style, one generally has a 4-column indent,
due to the "{" / "}" lines, which is enough (and sometimes too
much in case of many nested blocks). I've seen code with 8-column
indenting, and this is completely unreadable in a 80-column
terminal because most of the lines are too long.
Now, perhaps editors should provide block coloring to distinguish
them better (or side bars in different styles).
> - makes it harder to distinguish conditionals from function calls,
> both for the programmer, and for coding tools that try to care
If you mean "if (...)" vs "foo(...)", I think it should be better
done via coloring of *keywords*.
[...]
--
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)