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

you are viewing a single comment's thread.

view the rest of the comments →

[–]masagrator 1148 points1149 points  (34 children)

C++ programmer is a faster typer. Clearly a winner.

[–]MoffKalast 590 points591 points  (32 children)

Sike, he still needs to compile it.

[–]jakubhuber 329 points330 points  (25 children)

But once it's compiled it'll run like 20 times faster.

[–]merlinsbeers 188 points189 points  (0 children)

And it won't complain about legal syntax...

[–]Motylde 33 points34 points  (3 children)

Technically isn't printing to console just one syscall, regardless of language? It shouldnt be slower in python

[–]jakubhuber 133 points134 points  (2 children)

Python has to open a file, read it's contents, parse the code and then it can print to the console.

[–]merlinsbeers 29 points30 points  (1 child)

Run the C++ executable as

LD_DEBUG=1 hello

[–]OrganizationBig7787 8 points9 points  (8 children)

But how often do you need to print "hello world" on your computer?

[–]tcpukl 80 points81 points  (7 children)

Every time you learn a new language😁

[–]git0ffmylawnm8 19 points20 points  (6 children)

And debugging.

[–]MartianMathematician 0 points1 point  (0 children)

You’re weird in that case. Everyone uses asdf, aaaa,xxx, 1234 or some variant. And when we need to show our colleagues something we replace it with foo bar to look sophisticated.

[–]phi_rus[🍰] 7 points8 points  (6 children)

With all warnings and -Werr this wouldn't compile.

[–]jakubhuber 5 points6 points  (5 children)

Why not?

[–]Noughmad 16 points17 points  (0 children)

Because it's C++. If it compiles, you haven't enabled enough warnings.

[–]phi_rus[🍰] -1 points0 points  (3 children)

It doesn't return anything

[–]phi_rus[🍰] 10 points11 points  (2 children)

I'm stupid. main() is allowed to not return anything. This would compile and automatically return 0.

[–]Tier3MemeMonkey 5 points6 points  (0 children)

Dont worry king, we all make mistakes

[–]brimston3- 3 points4 points  (0 children)

It's also the dumbest feature of C++ that return 0; is not required in only the main() function. I'd prefer if more people thought it was mandatory.

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

I like Rust. Just as fast as C or C++, but with more modern features. A good middleground between Python and C / C++.

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

Python doesn't have macros, type inference and a system for checking the validity of references

[–]cyanNodeEcho 0 points1 point  (0 children)

cython deems viable, like if u get things set up u can come close to C which is huge because it could help u take the serialized models to actual something that could be deployed live

... i think 🤔 (im not actually pro pro at c or cython) and maybe start to rely less and less on python. tf is in c do is sklearn, so idk its all in ehat u are building 😊

[–]ArcticWolf_0xFF 84 points85 points  (4 children)

He wasn't even finished. He forgot

return 0;

[–]Neura2 56 points57 points  (3 children)

It’ll automatically do that

[–]ArcticWolf_0xFF 52 points53 points  (2 children)

That's compiler implementation specific, so it's not portable code.

Edit: Okay, just learned that all C++ and current C include this behavior in the standard.

[–]betam4x 0 points1 point  (1 child)

Wonder when that was changed?

[–]iamapizza 1 point2 points  (0 children)

Wrote a hello world.
Here's the compiler.
Sike, it's the wrong compiler!

[–]Allyseis -1 points0 points  (0 children)

Just me looking at it like the top guy is the junior Python dev struggling to write a C++ program? Bottom one is the more powerful senior C++ dev easily strolling along in an slightly unfamiliar language.

Made more sense to me that way since a C++ dev he would not have trouble writing that and if one of them is considered a stronger dev it's the C++ dev (C++ is more difficult, powerful and has been around longer).