Jeff's Ranting Ground

Where life is the longing for better things, and the passing of days.

If I hear another "Hard Tabs" vs "Soft Tabs" debate, I'm going to eat this cheesecake.

I've been integrating external source into my code this morning, and found a mix of hard tabs (the tab key on your keyboard) and soft tabs (people using spaces to simulate the former). I began to wonder, is this a personal preference, or is there some difference a little less obvious which causes people to work with the old but reliable soft tabs? None of my sources are awake at this time of morning, so I took a few minutes out to do some research.

There are, as I can now see, loads of arguments on the net comparing the two, some offering technical comparisons, some doing little better than name-calling. The people who are practical about it seem to stand by my way of thinking, which is always a nice feeling.

I like hard tabs. I like indentation being a one key action for creation, navigation and removal, yet still very readable. I like being able to have this, yet each indentation taking only one byte. I like being able to take the source I'm given and via simple search and replace, reducing the size of each file by around 20KB. Of course, like anything, it's bad if used improperly, but for pure indentation, it is my 4-spaces-in-a-character god.

So, for the record, if you want me to like and respect you as a supplier of source code, use so-called 'hard' tabs. Of course, I'll respect your views if you choose otherwise, but only under one condition. You have a good reason for doing so smile

Some articles on the subject of Tabs vs Spaces

PHP, PDT, Smarty ... why can't it just work?Life in the fast-lane

Write a comment

New comments have been disabled for this post.