Re: [cowiki-dev] Tabs vs spaces -- what's the downside?

Hakan Kuecuekyilmaz <[email protected]>
Newsgroups gmane.comp.php.cowiki.devel
Message-ID <[email protected]>
Quoting Sy <[email protected]>:

> I have heard some strong opinions on using spaces instead of tabs. 
> I've never understood this, because I've always assumed that everyone
> can use tabs and configure them neatly.
> 
> What are the disadvantages of using tabs?

Because every application displays tabs with different width. Say vi with 4
spaces and emacs with 8. Some other configuration with 5. So you have never a
predictable layout of your code. Therefore every guide for coding standards
prefers "space instead of tabs".

> 
> Are there common applications which cannot display tabs properly?
No application that I am aware of.


> Are there cases where one cannot type the tab character?
Thats not the point. The point is the display of the tabs.

> 
> Are there common tools which cannot be customized to make a tab
> display as 'x' characters of whitespace?

vi, emacs, and Eclipse have a config-switch which says "use space instead of
tabs". I am using emacs, every time I hit "tab" it inserts 4 spaces for me.

> 
> 
> I honestly don't understand using spaces, because .. it's extra typing.  =)

Configure your favorite editor to replace the tabs with the right number of
spaces :)

> 
> 
> I ask this because I'm just starting to learn a little bit of
> programming, and I'd like to learn more about common practices like
> tabs vs spaces.

I hope I could help you.
-- 
Hakan Kuecuekyilmaz

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.