| Off Topic > Off Topic |
| Programming Megathread |
| << < (89/241) > >> |
| Foxscotch:
when I'm just skimming, the first brace being on its own line confuses the heck out of me. I always see it as a blank line |
| $trinick:
It just makes the code look too spread out for me. If I see a function declaration, I know that the next line is going to be the contents of that function. Especially as proven by the indentation. I also don't like four-space or tab-style indentation. One or two spaces keeps it nice and compact: you can easily distinguish indentation levels and you aren't wasting a ton of space on the left side. It's especially annoying when you're being mindful of the width of your code and 1/3 the available space is occupied by whitespace on each line. |
| devildogelite:
--- Quote from: Ipquarx on February 08, 2016, 09:48:28 PM ---i can't stand either --- Code: ---namepsace X { inline namespace Y { void foo(); } } --- End code --- for the win --- End quote --- That's what I meant to do actually, didn't notice I screwed up the second one. |
| Waru:
--- Code: ---if difficulty == "easy" {randomize();randval = irandom_range(0,19);while randval = old_randval {randomize();randval = irandom_range(0,19);}showquestion = question[randval];old_randval = randval;} else if difficulty == "medium" {randomize();randval = irandom_range(20,39); while randval = old_randval {randomize();randval = irandom_range(20,39);} showquestion = question[randval];old_randval = randval;} --- End code --- |
| Kingdaro:
if difficulty == "easy" { randomize(); randval = irandom_range(0,19); while randval = old_randval { randomize(); randval = irandom_range(0,19); } showquestion = question[randval]; old_randval = randval; } else if difficulty == "medium" { randomize(); randval = irandom_range(20,39); while randval = old_randval { randomize(); randval = irandom_range(20,39); } showquestion = question[randval]; old_randval = randval; } Made it more readable for you. But what the hell is it? |
| Navigation |
| Message Index |
| Next page |
| Previous page |