[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

What indent style do you use? Allman masterrace coming through.

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 25
Thread images: 6

File: allman indntation style.jpg (24KB, 649x342px) Image search: [Google]
allman indntation style.jpg
24KB, 649x342px
What indent style do you use?

Allman masterrace coming through.
>>
>>60891007
>reddit spacing
>reddit brace spacing
IT ALL MAKES SENSE NOW
>>
File: shiteyanyo a cute.jpg (33KB, 600x447px) Image search: [Google]
shiteyanyo a cute.jpg
33KB, 600x447px
There's no need for braces if your conditionals are a single line.

I use same-line brackets for initializer lists and type definitions and new-line brackets for everything else.
I also like to use higher order conditional statements in order to make my loops and conditionals require only a single line so they won't need brackets.
Have you ever written a succinct 5-level nested for loop that required only a single semicolon?
Stuffing the middle segment of a for loop with multiple commas doesn't count either.
>>
K&R
>>
1TBS. Monitors have less vertical space than horizontal. Why would you waste that precious vertical space on opening braces?
>>
>>60891250
>1TBS. Monitors have less vertical space than horizontal.
why not get a monitor you can rotate?
>>
>>60891007
type function (arguments) {
if (condition) {
/* code */
} else {
/* code */
}
}
>>
>not following the style of the language, the project, or your team
i'm normally a braces-on-newline kind of guy, but i noticed that everyone in javascript does it on the same line, so i follow that guideline
>>
K&R for C
For php I find allman to be superior
>>
I just do whatever the fuck I want and then the Visual Studio solution that one of my coworkers set up fixes it.
>>
>>60891007
printf("%d is "+n==x*"not "+"equal to %d \n", x, n)
>>
>>60891264
Because then you end up with positively anemic horizontal space or way too much vertical space. And you then realize the reason why monitors are wider than they are tall is because of the way our eyes work.
>>
>>60891447
>not rotating your monitor 35°
it's almost like you don't want to succeed
>>
#include <stdio.h>
#include <stdbool.h>

#define GNUMASTERRACE 1
#define PLEBIAN -1

int
gnu_style_masterrace(char *code)
{
char *style = "gnu";
bool is_masterrace = false;
is_masterrace = check_style(code, style);
if (is_masterrace)
{
printf("You did good man\n");
return GNUMASTERRACE;
}
else
{
printf("You should kys\n");
return PLEBIAN;
}
}
>>
>>60891007
>>60891543
>redditspacing
it's like you're not even trying to fit in


Ratliff or K&R are the only acceptable answers
>>
>>60891458
I've got a VESA mount and can rotate my monitor any which way I please.

A good investment, I might add. Pay once for one of decent quality, use it over and over and over again.
>>
rate my meme
i actually do this haha :6]
>>
>>60891064
>There's no need for braces if your conditionals are a single line.

Braces make version control much easier.
>>
if (22/7 == M_PI) {statement1;
statement2;
doSomething();}
>>
File: vomit.jpg (213KB, 900x1200px) Image search: [Google]
vomit.jpg
213KB, 900x1200px
>>60891543
>>
>>60891609
Throw your computer in the trash, then remove your wrists so I never have to look at this again.
>>
>>60891609
what the fuck are your colors? you're going to have eye trouble within a year.
>>
File: kode with klossy.png (66KB, 597x255px) Image search: [Google]
kode with klossy.png
66KB, 597x255px
>>60891007
>>
>>60891285
this is correct, everything else is wrong
>>
File: file.png (107KB, 1190x759px) Image search: [Google]
file.png
107KB, 1190x759px
>>60891609
Disgusting. C is not ASM.

I've found 1 tab (8 spaces) looks the sexiest.
Thread posts: 25
Thread images: 6


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.