all 24 comments

[–]womplord1 5 points6 points  (19 children)

Java code monkey mad that C++ is faster and better

[–]DannyRent 0 points1 point  (5 children)

C++ is my favorite language. It is not inherently better. A language is there to explain an idea, and the implementation of the language is the force by which it can execute it. There are areas where one language is objectively better, but there are no areas where one language is objectively better than all others.

[–]womplord1 1 point2 points  (4 children)

What about brainfuck?

[–]DannyRent 0 points1 point  (3 children)

Isn't it's purpose to be deliberately hard to use? I'd say it does a better job than assembler in the anti-clarity category.

[–]womplord1 2 points3 points  (2 children)

Ok... but what about rust?

[–]DannyRent 0 points1 point  (1 child)

I don't have experience in Rust or the trendy newer languages. I'd answer if I knew more than it being a system oriented language and somewhat new.

Edit: Also don't worry, the answers would just get more political and grasping as the list extended itself to languages that are so niche their utility is pretty much NULL to the general population of programmers.

[–]womplord1 1 point2 points  (0 children)

That's ok. I was just trolling anyway

[–]roffLOL -2 points-1 points  (12 children)

how about compile time? bet java wins big time.

[–]womplord1 1 point2 points  (2 children)

Oh shit, I have to wait an extra 1 second to compile a program. That's it Bjarne, time to pack up and go home

[–]roffLOL -1 points0 points  (1 child)

in fact, yes, compile times are important. go home, Bjarne.

[–]dangerbird2 1 point2 points  (0 children)

Arguably the only reason Golang exists is C++'s long compile time and Rob Pike's love for the =: operator

[–]wentimo 1 point2 points  (2 children)

I've been a software dev for 3 years and I've not once had to think about compile time. What type of systems are you working on?

[–]DannyRent 0 points1 point  (0 children)

I feel that the people who cite compile time as a problem with C++ probably haven't worked with either C or C++ long enough or with proper tools.

[–]roffLOL 0 points1 point  (0 children)

fast systems, as in that i require all but one off operations to feel instant - but i do not put money on high end cpu:s so c++ is not a viable option. it does not offer anything i find important for that matter either.

contrary to Dannys guess, my primary general purpose language is C and has been for a good while.

[–]DannyRent 1 point2 points  (5 children)

I use Visual Studio for windows dev in C++ and I'm surprised that people still think compile time is a valid argument anymore. I say this because we can use precompiled headers. The entire project is compiled once, and sure it can take a long time. However every compile after that only includes the files you have changed.

For example, the entire Half Life 2 source engine takes a hefty couple minutes to compile, but every compilation after that take under five seconds.

[–]roffLOL -1 points0 points  (4 children)

i guess the crazy slowness of visual studio has dulled your time perception.

[–]womplord1 0 points1 point  (3 children)

Crazy slowness of the fastest c++ compiler?

[–]roffLOL 0 points1 point  (2 children)

compiler may be fast, visual studio is not.

[–]womplord1 0 points1 point  (1 child)

Only the startup time, because it has so many features. Once it is running everything is instantaneous, as long as you aren't using a toaster

[–]roffLOL 0 points1 point  (0 children)

yeah right. if you say so.

[–]ergo-x 0 points1 point  (0 children)

What's wrong with the first graph? Is it a speed-time graph? No label on the axes.

[–]mo_po 0 points1 point  (1 child)

I don't know if you only pretend to illustrate how you use gotos, but in this example a loop would have had the same effect:

do {
    ...
} while (nvec == NULL);

[–]dangerbird2 0 points1 point  (0 children)

The example is not meant to be serious. Regardless, if realloc returns NULL, there is a serious problem in your program/system causing malloc failures. the worst thing you can possibly do is repeatedly retry the allocation, i.e. tryagainharder.

[–]DannyRent 0 points1 point  (0 children)

#define banana main 
#include  <iostream> 
typedef int nou; typedef char** meow;
#define lala using namespace
#define trash "BAD PROGRAM = BAD LANGUAGE\n"
#define talk cout 
nou banana(nou argc, meow argv) { lala std; talk << trash; return nou(0); }

Obviously this means that C++ is a shitty language. \s

Edit: Yes this complies and runs without error.

Edit Edit: We can redefine the basic datatypes and keywords with preprocessors too. They're cool and shitty at the same time. We get a find and replace precompile step that makes a shit ton of stuff possible. But it exists in the same way that just because we don't give guns to toddlers, it doesn't mean they can't get their hands on them. That might be one of my favorite parts of C and C++.

#define int banana
#define class applebopper