Re: On Tabs and Spaces
From: Dmitry Potapov <hidden>
Date: 2016-06-15 22:43:42
On Tue, Oct 16, 2007 at 12:20:50PM -0700, Linus Torvalds wrote:
The answer is *also* not "tabs are just for initial code indents",
Unfortunately, it leads to some problems. For example, you can type:
git blame alloc.c
2c1cbec1 (Linus Torvalds 2007-04-16 22:10:19 -0700 21) #define DEFINE_ALLOCATOR(name, type) \
855419f7 (Linus Torvalds 2006-06-19 10:44:15 -0700 22) static unsigned int name##_allocs; \
100c5f3b (Linus Torvalds 2007-04-16 22:11:43 -0700 23) void *alloc_##name##_node(void) \
855419f7 (Linus Torvalds 2006-06-19 10:44:15 -0700 24) { \
855419f7 (Linus Torvalds 2006-06-19 10:44:15 -0700 25) static int nr; \
and see that the end of line 23 does not look right. Because of that,
I prefer tabs for initial code indents and spaces in other places. Of
course, my preferences are irrelevant when it comes to someone else's
project, and I can easily use whatever style it takes to get things
done. It is just that "use tabs elsewhere and everything will be fine
as long as you have the standard tab setting" is not exactly correct.
The rest is people's preferences and habits...
Dmitry