Okay niggers, let's settle this once and for all

Okay niggers, let's settle this once and for all

Which one is superior A or B?

Please note, javascript pajeets are not welcome to voice they're opinion, you have to compile C++ on an UNIX like OS in order to post ITT

Other urls found in this thread:

kernel.org/doc/html/v4.10/process/coding-style.html
kernel.org/doc/Documentation/process/coding-style.rst
twitter.com/NSFWRedditImage

A is the only correct answer

What's the font

B for functions, A for everything else

menlo regular

mixing is the worst

A

A takes less lines and is more aesthetically pleasing

maybe but it triggers my autismo

B. It's easier to read and separate.

they're both wrong you cock eating faggot

always B.

B is the clearest

so what do you propose, this:
if(poo==loo){
pajeet();}

I used to be like you, when I was in my first year of programming and I had been taught nothing but C#.

B is objectively bad. There is no reason to have a whole line wasted on a semi-colon. Are you mad?

A, but remove the spaces from the brackets.

And put a space between ) and {

lol what?

Good luck reading A with nested ifs

B, clearly

>nested ifs
Good code doesn't have this problem.

You can't put a function inside of a function.

i'm talking global scope

pajeet ? street : loo

O shit you wrote nigger? O shit... Man you're a badass.

>C++
>not a pajeet language
Depends on the language anyway, for non-languages like JS I use A, for real languages I use B.

A because is easy to read. And some editor left the open bracket when you want to collapse the function.

B looks disjointed

A is superior apart from for functions which deserve another line.
There should be a space between if and ( and ) and { but none between nigger and ()

Sure, let code javascript with no more than 2 nested bracelet.

Its not mixing though. A is for control flow, B is for a heading; which is basically what a subroutine/function is

have you ever worked on a huge software? This stuff does happen and usually nesting ifs is the best solution to the problem there is

A looks better and takes less lines
B is more logical

i prefer A

neither

function pooLoo(street) {if(!(poo in loo))
{return pajeet};
}

Get back to garbage company my friend.

it just depends on whats standard for the language you're working on and whatever style guide your development team uses

i use c# a lot and B is standard, A is very common in java and javascript, don't be a pajeet and get too hung up on it

A
But its irrelevant because I only use python. Lmao

if (nigger == nigger) nigger();

int main() {
char const * const op = "";
const int faggot = 8; /* 8 is a faggy number */
if (*op & faggot) {
puts("op is a phaggot");
}
return 0;
}

I choose option C.

Godspeed...

this

This.
4 space tabs also.
K&R masterrace

...

if nigger == nigger:
nigger()

B

Nesting shitloads of ifs is never the best solution. Never.

>using braces for a single statement
jej

>using a language that lets the programmer choose
hwh

>getting cucked by a computer program
ayy lmao

If you don't do it like this you're a mental incompetent.

needs to be center alligned

>those spaces
youre filth

i wouldn't put the semicolons there, but it looks kinda neat. makes me miss Python. is there a plugin for this or something? tell me you don't do this shit manually.

A

pajeet tier
if( stuff ){


only sane way
if(stuff) {

>only sane way
>if(stuff) {
THIS. THANK YOU.

Why are you ni/g/gers so jewy about number of lines?

same result so however you fucking like.

because my screen can have only so many lines in showing at once

I mean, you should simplify as much of the boolean logic as you can but sometimes nesting is unavoidable if you want to write efficient or readable code.

I have no problem reading nested ifs. Perhaps you should get your eyes checked.

typical racist white

stop it you mongoloid nigger cucks

kernel.org/doc/html/v4.10/process/coding-style.html

B is better. But whatever you're doing, remove the spaces after opening and before closing brackets. Also, put a space before opening curly if you're using A.

if (nigger) {

a space belongs between if/for/while/switch and (.

they're not functions, and a conventional stylistic difference in invocations is intentional, you dumb nigger.

Actually, with gcc you can

int main(int argc, char **argv)
{
if (foo == bar)
{
baz();
}
}

Idk I always do B because it's more readable imho
But A is more aesthetically pleasing though

But if it's just one line I've begun doing
if(cond)
doSth();

>that spacing
Both are pajeet tier.

A

*thier

int main(int argc, char **argv)
{
if (foo == bar) {
baz();
}
}


fixed your shit, including your spaces, you dumb nigger. kys or stop koding.

Neither. I don't use profanity in code.
I use the second one. But for such small blocks I wouldn't use brackets at all.
Most likely I'd probably just write it on one line. But I've been known to mix those styles.
Sometimes I just feel it gets too long. Regardless of if the line is less than 80 chars

Disgustingly inconsistent.

...

if: (cond)&&todo
if else: ()?:
functions: new Function(function code)

B, easier to see where scopes start/end at a glance or when you're scrolling.

lose the curly braces around baz(); and you got yourself a winner

I prefer to avoid any possibility of a goto fail;

Yuck man. How do you even justify this? The moment you ever have to copy/paste you have to remember where the fuck you are and you're more prone to error. Just hit enter, always, FFS.

fuck you.
also see:

>k&r is right
While I agree there needs to be better motivation.

Cool non-justification.

The Linux code style uses 8 spaces specifically to counter warn when code is nested too deep.

>In short, 8-char indents make things easier to read, and have the added benefit of warning you when you're nesting your functions too deep.
>Heed that warning.

kernel.org/doc/Documentation/process/coding-style.rst

no it doesn't, dumb faggot.

I prefer many line breaks. Like this;

if
(OP == racist)
{
gtfo();
}

if
(
OP
==
racist
)
{
gtfo
();
}

>using goto
>main.cpp
pls b b8

if(


cancer thinking if is a function

Why even indent at this point?

>using {} at all in this case
>not using far superior (condition)?nigger():nonigger()

>missing the point

>not using an auto source code formatter
are you also thicc in the bottom, or just the head?

how about or

if (a == b) {
do();
}


Spaces before parens for macros, no spaces for functions.

If(nigger==nigger){nigger ();}

Fight me

>Spaces before parens
dumb faggot poster.

if is not a function.