freezway
|
|
Posted on: October 18, 2010, 09:17:39 pm |
|
|
Joined: Dec 2009
Posts: 220
|
Dear TGMG,
USE SPACES! NO ONE LIKES TABS!
|
|
|
Logged
|
if you drop a cat with buttered toast strapped to its back, which side lands down? joshdreamland: our languages are based on the idea that it's going to end up FUBAR /kick retep998
|
|
|
|
Josh @ Dreamland
|
|
Reply #2 Posted on: October 19, 2010, 09:11:41 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
I like consistency, and tabs don't offer that. Wherever I open my code, I want it to look the same.
{ float a = 0, b = 1;
I don't like going out of my way to make it [tab]float...[tab][space][space][space][space][space]b... I like pressing tab two or three times, then just backspacing to where it lines up.
I also like leaving indentation on blank lines. That way, I just click where I want to insert, and press enter. But no, damn IDEs keep stripping trailing blanks.
Anyway, iirc tabs are illegal in YAML, Firefox strips them from non-first-char pastes, replacing them with spaces.... they're a dying breed.
|
|
« Last Edit: October 19, 2010, 09:14:30 am by Josh @ Dreamland »
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|
|
|
Josh @ Dreamland
|
|
Reply #7 Posted on: October 19, 2010, 03:18:43 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Which is the only way to consistently pull of the code I posted above. Otherwise, the b could be misaligned with the a for everyone not using a tab width of 2, or whatever.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
Rusky
|
|
Reply #8 Posted on: October 19, 2010, 06:01:34 pm |
|
|
Joined: Feb 2008
Posts: 954
|
Which is why you don't use arbitrarily-indented blocks. It works for every case but that one which gets a little ugly:
float a = 0, b = 1; Where it does work:
name = function( foo, bar, baz, quux ); for ( initializer; condition; update; ) { stuff; } name = { initializer, list }; Constructor::Constructor( arguments ) : initializer(foo), list(bar) { stuff; } Constructor::Constructor( arguments ) : initializer(foo), list(bar) { stuff; } ...and so on, with tweaks for your style preferences.
|
|
|
Logged
|
|
|
|
freezway
|
|
Reply #9 Posted on: October 19, 2010, 11:31:18 pm |
|
|
Joined: Dec 2009
Posts: 220
|
I also like leaving indentation on blank lines. That way, I just click where I want to insert, and press enter. But no, damn IDEs keep stripping trailing blanks.
YES! can't stand int blah(int foo) { bar;}
|
|
|
Logged
|
if you drop a cat with buttered toast strapped to its back, which side lands down? joshdreamland: our languages are based on the idea that it's going to end up FUBAR /kick retep998
|
|
|
|
freezway
|
|
Reply #11 Posted on: October 22, 2010, 05:39:57 pm |
|
|
Joined: Dec 2009
Posts: 220
|
its annoying to bet things to line up. Can't Xcode use spaces?
|
|
|
Logged
|
if you drop a cat with buttered toast strapped to its back, which side lands down? joshdreamland: our languages are based on the idea that it's going to end up FUBAR /kick retep998
|
|
|
Post made October 24, 2010, 11:11:30 am was deleted at the author's request.
|
|
|
|