well /g/?
>>56366218
Does it matter?
>>56366218
baby's first main
>>56366218
both do the same thing and it's stupid to argue about this shit unless you have a coding standard by someone to follow.
The second one
Looks more like python, which is aesthetically pleasing to my brain
>>56366218I personally prefer
{
vaginas
}
eat dicks
Dont care either way as long as it is consistent within the file
>>56366224
>>56366234
>>56366237
look at these sad sallys. Why don't you go talk about Tek Syndicate some more.
>>56366218int main(int argc, char **argv)
{
std::cout << "OP is a faggot";
return 0;
}
>>56366260
this. I want to scratch my eyes out when people aren't consistent in format.
>>56366247
too bad you never {
get any
}
Why did you write two main functions?
int main(argc, argv)
int argc;
char **argv;
{
puts("eat dicks");
return 0;
}
>>56366218
First one. Heretic people all over the world have claimed that this inconsistency is ... well ... inconsistent, but all right-thinking people know that (a) K&R are _right_ and (b) K&R are right.
>>56366286int
main(int argc, char **argv)
{
std::cout << "look at how readable it is this way";
return 0;
}
>>56366433
holy fukk, this satisfies my 'tism
>>56366433
I like it but my austism goes crazy with the type and name not being side by side.
>cout
lmao get gud
>cout
cout
>cout
cout
>cout
cout
>cout
cout
>cout
cout
ENJOY YOUR BOTNET
Both. 2nd for Java, 1st for C++
>>56366218
First one in C/C++/C#
Second one in Java.
>>56366218
I respect K&R but the second one
also
>iostream in a hello world program
>>56366433
stallman please go
>>56366218
I use to code using 1 method, then when I started coding in python I started to do the 2nd method.
I do 2nd out of habit, but I do think 1st is more visually pleasing.
>>56366218
By the way what's the color theme?
Also: there should be a space between the function name and the parameter list. Not in the function call, just in the function prototype and header.int main (int argc, char **argv)
{
std::cout << "main with parameters";
return 0;
}
int main ()
{
std::cout << "main without parameters";
return 0;
}
(Of course, as in the OP, these wouldn't both be defined together. In fact, the way main works in C/C++ is sort of the opposite of function overloading.)
>>56369024
Autism.
Space are only for conditionals and loops.
>>56366218
the first one is better
>>56369161
This desu
I honestly don't understand how anyone could prefer the first.
void write_dicks(int nmbrDicks)
{
int i;
for (i=0 ; i<nmbrDicks ; i++) {
printf("eat %d dicks", nmbrDicks);
}
}
int main(int argc, char **argv)
{
MAIN_FUNCTION (argc, argv);
return 0;}
int MAIN_FUNCTION (int Variable_Name, char **Other_Variable_Name)
{
std::cout << "eat dicks";
return 0;}
>>56366218
there's no option in go
>>56369219
I didn't at first but somewhere along the way I switched.
>>56366218
haskell
because
main = putStr "eat dicks"
no need for {}
also
>sepples
>>56369358
nah it'd be too easy to miss the closing } making it harder to read
lol{dongs;}