Re: [go-nuts] Why were tabs chosen for indentation?

2017-03-20 Thread Dan Kortschak
On Mon, 2017-03-20 at 09:45 +0100, 'Axel Wagner' via golang-nuts wrote: > The "philosophy of gofmt" was to end arguments about how go code > should be formatted. > Which gives this thread a special form of irony :) People will always adjust their behaviour to minimise the delta on their

Re: [go-nuts] Why were tabs chosen for indentation?

2017-03-20 Thread 'Axel Wagner' via golang-nuts
The "philosophy of gofmt" was to end arguments about how go code should be formatted. Which gives this thread a special form of irony :) On Mon, Mar 20, 2017 at 1:59 AM, Wojciech S. Czarnecki wrote: > > > > On Sun, 19 Mar 2017, at 09:35 PM, Rob Pike wrote: > > > everyone will

Re: [go-nuts] Why were tabs chosen for indentation?

2017-03-19 Thread Wojciech S. Czarnecki
> > On Sun, 19 Mar 2017, at 09:35 PM, Rob Pike wrote: > > everyone will see code indented as wide (or not) as they prefer. > Ian Davis wrote: > It seems to me that this explanation is at odds with the philosophy of > gofmt which is that there is a single way to lay out code.

Re: [go-nuts] Why were tabs chosen for indentation?

2017-03-19 Thread Ian Davis
On Sun, 19 Mar 2017, at 09:35 PM, Rob Pike wrote: > How wide should the indentation be? 2 spaces? 4? 8? Something else? > > By making the indent be a tab, you get to decide the answer to that > question and everyone will see code indented as wide (or not) as > they prefer. > > In short, this

Re: [go-nuts] Why were tabs chosen for indentation?

2017-03-19 Thread 'Kevin Malachowski' via golang-nuts
I love that Go uses tabs because I use 3 spaces for my tabstop, and very few people share that preference. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [go-nuts] Why were tabs chosen for indentation?

2017-03-19 Thread Tim K
gofmt documentation says: Gofmt formats Go programs. It uses tabs (*width = 8*) for indentation and > blanks for alignment. > https://golang.org/cmd/gofmt/ Just curious, any reason why it needs to specify the tab width = 8? Should that be removed if it's not relevant? Thanks! On Sunday,

Re: [go-nuts] Why were tabs chosen for indentation?

2017-03-19 Thread Carl
Exactly what I was looking for. Thank you! On Monday, March 20, 2017 at 10:36:06 AM UTC+13, Rob 'Commander' Pike wrote: > > How wide should the indentation be? 2 spaces? 4? 8? Something else? > > By making the indent be a tab, you get to decide the answer to that > question and everyone will see

Re: [go-nuts] Why were tabs chosen for indentation?

2017-03-19 Thread Rob Pike
How wide should the indentation be? 2 spaces? 4? 8? Something else? By making the indent be a tab, you get to decide the answer to that question and everyone will see code indented as wide (or not) as they prefer. In short, this is what the tab character is for. -rob On Sun, Mar 19, 2017 at

[go-nuts] Why were tabs chosen for indentation?

2017-03-19 Thread Carl
Hi, This is a question to whoever decided that go will use tabs - team or person: Could you please explain your reasoning behind the decision? So far, all my googling has just turned up the what and not the why: States that tabs are to be used: cmd/gofmt: remove -tabs and -tabwidth flags