[OT] Spaces/tabs (Was: simple display (from: GUI library for D))

Jonathan M Davis jmdavisProg at gmx.com
Tue Apr 12 18:52:16 PDT 2011


> On 2011-04-12 05:19, Jonathan M Davis wrote:
> >> On 04/11/2011 08:13 AM, Jonathan M Davis wrote:
> >>> They mix tabs and spaces. On some lines, they use spaces and on others
> >>> they use tabs.
> >> 
> >> Never seen this, not even once. Messing can only happen when one
> >> copy-pastes from modules using spaces.
> > 
> > As Steve pointed out, it frequently happens when you have multiple
> > developers working on the same code. It may work with one developer who
> > likes using tabs, but as soon as you get a mix of developers, you
> > invariably get a mix of spaces and tabs unless _everyone_ involved is
> > really careful, and that rarely happens. It's just too easy to use
> > spaces without realizing that someone else used tabs or even that you
> > yourself are using spaces, depending on your editor's settings.
> 
> How can it not be as easy to use tabs without realizing that someone
> else used spaces?

Oh, it can be. But what generally happens in environments where spaces are 
required is that everyone sets up their editors to insert spaces when you hit 
the tab key instead of a tab (if everyone is using a common IDE, it's probably
even required), so it becomes pretty much impossible to enter tabs by accident,
whereas in an environment where tabs are used, you're not going to disable the
spacebar, so spaces can still be inserted. So, generally, in a spaces-only
environment, you don't run into problems with tabs.

- Jonathan M Davis


More information about the Digitalmars-d mailing list