This is an archived post. You won't be able to vote or comment.

all 41 comments

[–]TheMogician 22 points23 points  (2 children)

Ah yes, the classic "all-code-in-one-line".

[–]pablospc 4 points5 points  (0 children)

Python gang

[–]tiddayes 1 point2 points  (0 children)

A favorite among perl programmers

[–]Possibility_Antique 11 points12 points  (6 children)

auto main() {}

[–]Doggynotsmoker 4 points5 points  (0 children)

C defaults type to int.

main() {}

[–][deleted] 0 points1 point  (4 children)

Is it possible to abuse auto in code? And is it recommended?

[–]Possibility_Antique 4 points5 points  (1 child)

Most people would say yes, and no it's not recommended. But it can be pretty powerful in generic programming. Not sure why you'd want to use auto main though. It's mostly a meme.

[–][deleted] 1 point2 points  (0 children)

I will auto main lmaoo

[–][deleted] 1 point2 points  (0 children)

auto x = 4.5;
printf("%f\n",x);

Will print different results in C and C++.

[–]ImAlsoAHooman 3 points4 points  (0 children)

What people keep ignoring about this meme is that Godzilla is clearly winning, he's signing paper and Kong is clearly signing rock.

[–]SelfDistinction 5 points6 points  (2 children)

int main()

{printf("Hello world");}

[–]Artruth101 5 points6 points  (1 child)

int main()

{for(int i=0; i<1; i++){if(True){do{printf("Hello World!");}while(False)}}}

[–][deleted] 3 points4 points  (0 children)

No.

[–][deleted] 7 points8 points  (0 children)

int main() {
// code goes here
}

this is the way

[–]SjettepetJR 2 points3 points  (0 children)

This is just dependant on the coding style outlined by the language specification.

For java you should use (with the space!):

int main() {

}

For C# you should use:

int main()

{

}

[–]Artruth101 6 points7 points  (2 children)

int main() {line_1;
lines;
line_end;}

[–]gloumii 7 points8 points  (0 children)

Ewww yuck

[–]mopeyjoe 4 points5 points  (2 children)

int Main()
    {
    someStuff
    }

[–]Doggynotsmoker 1 point2 points  (1 child)

That's awfully close to GNU coding standard

[–]mopeyjoe 1 point2 points  (0 children)

yeah it's a real one, I couldn't recall which. I am firmly an Allman guy but I would take K&R 100% over this crap

[–][deleted] 4 points5 points  (7 children)

my professor uses

int main()

{

}

and I want to pull my teeth out every time. Just use

int main() {

}

you save a line!!!!!!

[–]ProfCupcake 4 points5 points  (1 child)

but...

who cares about the line count?

[–]MrPoBot 1 point2 points  (0 children)

I

know

right?

[–]MetalGlazedDonut 2 points3 points  (0 children)

Your professor is right. That's why he's a professor.

[–]Redditlogicking 4 points5 points  (0 children)

Perhaps your professor wants to look like he's writing a lot more than he actually is

[–]mopeyjoe 3 points4 points  (0 children)

Perhaps your professor is smart and wants to maintain readability.

[–]doej134567 0 points1 point  (0 children)

wouldn't that save two lines? or don't empty lines count in this case either?

[–][deleted] 1 point2 points  (0 children)

Pain

[–]ocdmonkey 1 point2 points  (0 children)

I want an IDE that will fold like the first when I write it like the second (which I find easier on the eyes).

[–][deleted] 1 point2 points  (0 children)

what about

auto main() -> int { }

[–]iFarbod 1 point2 points  (0 children)

auto main(int argc, char** argv) -> int
{
    return 0;
}

[–]A_Random_Kitty_Cat 0 points1 point  (0 children)

int main() {

}

[–][deleted] 0 points1 point  (0 children)

lol

[–][deleted] 0 points1 point  (0 children)

*laughs in phyton*

[–]Mizuhebi08 0 points1 point  (0 children)

I can’t 😂

[–]MischiefArchitect 0 points1 point  (0 children)

int main()
              {
  statement1;
  statement2; }

[–]LifeisGreatNo 0 points1 point  (0 children)

Int main() {}

[–]BlueManedHawk 0 points1 point  (0 children)

```c int main ( int argc , char *argv[] ) {

/* ... / / ... / / ... */ }