D pullrequest review process rant

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Thu May 9 03:19:06 PDT 2013


On 05/09/2013 10:48 AM, Russel Winder wrote:
> I have to admit the thing I really like about Go is the insistence on
> using tab character for leading indent. Now that I have discovered how
> to make tab display as 2 spaces instead of 8, I really like the lack of
> discussion about how many leading spaces per indent level in the source
> code. I would really like Python to have followed this rule.

I admit to liking "tabs for indentation, spaces for alignment":
http://www.emacswiki.org/SmartTabs

... though I actually use Vi rather than Emacs to get it.  So that's clearly at
least two counts on which I deserve to die. :-)

> Of course then you can bikeshed about whether the { goes on the end of
> the line or on the next line.  Clearly the only sane place is the end of
> the line, but many people hate that. And hate leads to suffering.

Don't know quite why, but I wound up quite liking the rule that Linus Torvalds
suggested, which I think comes from K&R -- separate-line { for the opening of a
function, same-line { for if(), while() statements and so on.

> The positive lesson from Go is that application of one, and only one,
> formatting style, backed up by a tool incorporated into the compiler,
> does lead to the avoidance of bikeshedding and to community peace — just
> not world peace.  

Does it not make debugging a pain sometimes?  I'm fairly sure there are times
when commenting out bits of code for debug purposes, I've in the process left
other parts with incorrect indentation etc.



More information about the Digitalmars-d mailing list