News for hackers. Stuff that matters.
Re:Godit - A very religious text editor written in Go by mbrock on Thursday March 28, 2013 @05:35AM (#5453946)
Obviously the tab character should move forward to the next column divisible by the tab size -- it's not just a replacement for a fixed number of spaces!
Re:Godit - A very religious text editor written in Go by nsf on Thursday March 28, 2013 @05:40AM (#5453962)
That's just my english. Of course I meant that the tab size is the same as the size of 8 space characters. And it sounds like the tab _character_ is an equivalent to 8 spaces, which is not true. Sorry for confusing description.
Re:Godit - A very religious text editor written in Go by lsiebert on Thursday March 28, 2013 @06:19AM (#5454047)
so, you can indent 9 times in an 80 column display, and less then that usefully?

I'd much rather have tab size be set to get smaller based on the number of indentations/longest line.

Re:Godit - A very religious text editor written in Go by mich41 on Thursday March 28, 2013 @06:41AM (#5454095)
Prophet says:

Now, some people will claim that having 8-character indentations makes the code move too far to the right, and makes it hard to read on a 80-character terminal screen. The answer to that is that if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program.

And I think I kinda agree with this.

Re:Godit - A very religious text editor written in Go by laumars on Thursday March 28, 2013 @07:03AM (#5454163)
I do agree that there comes a point where you can get over zealous with indentation, but 3 levels deep is pretty common. In fact you idle at one level of indentation just with having your code inside a function. So basically all you need is one conditional inside a loop and you're already maxed out.
Re:Godit - A very religious text editor written in Go by FuzzyDunlop on Thursday March 28, 2013 @07:22AM (#5454211)
Probably not good for ruby when combinations of the following things can result in deeply nested code:

    module
      class
        def
          if
        class << self
          def
Re:Godit - A very religious text editor written in Go by mich41 on Thursday March 28, 2013 @07:49AM (#5454277)
Well, the Prophet is a C programmer so his numbers may need adjustment by some constant for languages with objects, namespaces, modules, etc.

But still excessive indentation is a hint that the code may benefit from some refactoring.