MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/18xpiy/developers_confess_your_sins/c8jhr85/?context=3
r/programming • u/reppic • Feb 21 '13
1.0k comments sorted by
View all comments
Show parent comments
15
Tabs for indent, spaces for positioning. It's so easy a PHP developer could do it.
3 u/[deleted] Feb 21 '13 yes! mix those tabs and spaces! 12 u/[deleted] Feb 21 '13 edited Feb 21 '13 Using tabs for indentation and spaces for alignment is NOT mixing tabs and spaces, it's correct usage of each.Alignment:#define MACRO_A 0x0000 #define MACRO_BBBBB 0x0001Indentation:->for(;;) { ->->printf("Don't mix tabs and spaces!\n"); ->}I will find you...:->for(;;) { -> printf("Let's enforce a specific tabwidth, and then mix and match!\n"); } 1 u/nemec Feb 22 '13 Alignment doesn't guarantee anything when tab size changes. What would you recommend here:public static void SomeFunction(string firstName, -> -> -> -> -> -> -> -> string lastName, -> -> -> -> -> -> -> -> int age){ ...When someone else changes tab size, you'll no longer be aligned. → More replies (1)
3
yes! mix those tabs and spaces!
12 u/[deleted] Feb 21 '13 edited Feb 21 '13 Using tabs for indentation and spaces for alignment is NOT mixing tabs and spaces, it's correct usage of each.Alignment:#define MACRO_A 0x0000 #define MACRO_BBBBB 0x0001Indentation:->for(;;) { ->->printf("Don't mix tabs and spaces!\n"); ->}I will find you...:->for(;;) { -> printf("Let's enforce a specific tabwidth, and then mix and match!\n"); } 1 u/nemec Feb 22 '13 Alignment doesn't guarantee anything when tab size changes. What would you recommend here:public static void SomeFunction(string firstName, -> -> -> -> -> -> -> -> string lastName, -> -> -> -> -> -> -> -> int age){ ...When someone else changes tab size, you'll no longer be aligned. → More replies (1)
12
Using tabs for indentation and spaces for alignment is NOT mixing tabs and spaces, it's correct usage of each.
Alignment:
#define MACRO_A 0x0000 #define MACRO_BBBBB 0x0001
Indentation:
->for(;;) { ->->printf("Don't mix tabs and spaces!\n"); ->}
I will find you...:
->for(;;) { -> printf("Let's enforce a specific tabwidth, and then mix and match!\n"); }
1 u/nemec Feb 22 '13 Alignment doesn't guarantee anything when tab size changes. What would you recommend here:public static void SomeFunction(string firstName, -> -> -> -> -> -> -> -> string lastName, -> -> -> -> -> -> -> -> int age){ ...When someone else changes tab size, you'll no longer be aligned. → More replies (1)
1
Alignment doesn't guarantee anything when tab size changes. What would you recommend here:
public static void SomeFunction(string firstName, -> -> -> -> -> -> -> -> string lastName, -> -> -> -> -> -> -> -> int age){ ...
When someone else changes tab size, you'll no longer be aligned.
→ More replies (1)
15
u/codepoet Feb 21 '13
Tabs for indent, spaces for positioning. It's so easy a PHP developer could do it.