I fucking hate curly braces on new lines!

I fucking hate curly braces on new lines!

It pisses me off!

I dont wanna learn C++ because of that

autism is unfortunately not cureable.

>C++
only windblows and Visual Studio faggets use that style, use clang-format and thank me later

>Import code in your favorite IDE
>Use autoformat to get rid of curly braces on new lines
>Enjoy code in non-autistic mode
>Commit your formatted code and watch the world burn
>REEEEEEEEEEEEEEEE
It is that simple, user

It's the most readable.

#include

void main()
{
printf("Hello, world");
return;
}

>windblows
It's been the standard GNU format since forever.

>I dont wanna learn C++ because of that
you don't have to do it you know

and this is GNU C style
if (x < foo (y, z))
haha = bar[4] + 5;
else
{
while (z)
{
haha += foo (z, z);
z--;
}
return ++x + bar ();
}

you think that matters? no one respects GNU's retarded conventions

/thread

bad quote

int main(){
std::cout

>no space before the opening bracket
Absolutely fucking disgusting

int main(){std::cout

It says it can't find cout in std. What do?

#include

>yeah newline people are so du-

int main() {
std::cout

>I want to have my cake and eat it too

Pretty gross, my dude.

console.log(await f(await e(await d(await c(await b(await a()))))));

I don't care which style you use, as long as you don't write } else {

kek, c# is cancer

The pajeet style is to not have braces open on their own lines in an attempt to make Java code seem shorter and thus less bloated

functions in C should fit in a 80x24 terminal

THIS

This is only a step above While not as ugly, its still bad on readability/hierarchy. It is even worse because on modern(maybe not so modern) editors, you can collapse brackets. With brackets that are not placed on left side, this becomes a confusing hurdle especially with multiple nested brackets

good

// Not enough space
int f() {
int variable = 3;
function();
return variable;
}

// Inconsistent
int f() {

int variable = 3;
function();
return variable;
}

// Pointless
int f() {

int variable = 3;
function();
return variable;

}

// Perfection
int f()
{
int variable = 3;
function();
return variable;
}

>c#

>Curly braces
Ew.

Curly braces are only for noobies who didn't discover the define preprocessor

if you want to hide braces so much you might as well use python

You state every possible bullshit, but not the...

ma {
gic
}
of consistency.

Let me guess, you learned JS first...

auto main() -> int {std::cout

This is just begging for trouble. I like the way it looks, but it's probably better to use Visual Basic if you want "end" instead of braces.

>This is just begging for trouble.
Not really, however stupid it is, it'll still work perfectly fine.

class HelloWorld {
public static void main(String arg[]) {
System.out.println("Hello World");
}
}

All this to write Hello World in Java...

Have you tried getting a job in food service?

tfw I took C++ in college and couldn't understand any of it

C++ is fucking shit that's why
You're either a brainlet or poorly taught if you fail to understand C though

It was basically like all this info thrown at me and me not having any prior idea of how to do programming was lost in it.

Yep, that's what's wrong with learning C++. If yu already know C and Java it's not too bad, but otherwise it's too much to ask of a novice.

static struct prefix_some_type **
prefix_function_name(type a, type b)
{
/*
* your code goes here with 8-sized indent
*/
for (int i = 0; i < 10; i++) {
fprintf(stdout, "OP is faggot\n");
fprintf(stderr, "yep, still faggot.\n");
}
return NULL;
}

So what would be worth learning if I went back to college?

Like I said, C and Java are simple enough languages that are easy for brainlets to get the hang of. Java in particular is mandatory if you want a code monkey job.

That would look just as bad with newlines

K&R Style/Linux Kernel Style/Stroustrup Style uses curly braces on new lines for functions, and only for functions.

>void main
Kill yourself.

>8-sized indent
Indentation should be done with a hard tab, not 8 spaces. It should look perfectly indented regardless of which size a tab character is.

>not using K&R for all langs with C based syntax
shiggy
diggy

I also used to hate curly braces but you get used to it quickly. What I REALLY hate is semi-colons to end lines. The fact that nearly every language requires this is just mind-boggling. Yes I know it's so you can write badly formatted code on a single line, but semi-colons can be OPTIONAL to allow this. They should not be required.

I usually do but Sup Forums prints them as 4sized

If you don't have it, you get shitlangs like javascript.
function foo()
{
return
{
object : "literal"
}
}

I use C++, JavaScript, Python and Bash at work, yet I still prefer VB.NET for home projects. So easy to use and love the syntax. Not a curly brace or semi-colon to be seen.

How so? JavaScript does require semi-colons. Also why would you create an object with a key called "object"?

js ofc, I don't do js. forgot they have await there too. Both cancerous though. glad I'm done with c# and I will never even fucking touch js

Javascript has automatic semicolon insertion, which breaks code like what I just posted.

>std::cout
>not just putting "using namespace std;" at the top of your programs

looks like this class is the autism edition anyway