[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]

well /g/?

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: 40
Thread images: 1

File: ageolddebate.png (11KB, 476x462px) Image search: [Google]
ageolddebate.png
11KB, 476x462px
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
>>
>>56366218
I personally prefer
{
vaginas
}
>>
>>56366224
>>56366234
>>56366237
Die.
>>
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.
>>
>>56366218
int 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.
>>
>>56366218
1
>>
>>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.
>>
>>56366286
int
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;}
Thread posts: 40
Thread images: 1


[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.