[GRASSGUI] Re: a couple of questions
glynn at gclements.plus.com
Tue Apr 24 00:41:55 EDT 2007
Michael Barton wrote:
> >> One thing that I notice is that when we both work on a file, we apparently
> >> have different ways of indenting. This produces errors if not consistent
> >> within a method or sometimes within a class. To get in sync, I was wondering
> >> how you do indentsspaces or tabs? If spaces, how many? Glynn Clements
> >> recommended tabs and a common indent distance of 4 spaces.
> > yes, it must be synchronized. Hm, I am using default python-mode in
> > Emacs 21.3.1. On my laptop Emacs 22.x.
> I'm using default python-mode tabs in Eclipse. It may be a thing of using
> tabs or spaces. I can turn all my tabs to spaces. But a recent post from
> Glynn suggested that tabs were preferable (for some reason I don't
Hmm; I don't recall that.
Spaces are more robust, as there's no ambiguity as to how many columns
a space occupies. With tabs, there's always the problem of people
thinking that tab width is a preference, and then their code isn't
indented correctly (and, in Python, that means that it doesn't work).
If everyone always, without exception, used tabs for indentation, then
you could change your editor's tab width with no adverse consequences.
Unfortunately, that's a pretty big "if"; in my experience, any
approach which relies upon the concept of "without exception" is
Ultimately, it doesn't matter what you use so long as your editor's
tab width is 8 columns. If it's something else, then you *must* use
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-gui