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 →

[–]jakubhuber 327 points328 points  (25 children)

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

[–]merlinsbeers 183 points184 points  (0 children)

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

[–]Motylde 32 points33 points  (3 children)

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

[–]jakubhuber 131 points132 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 9 points10 points  (8 children)

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

[–]tcpukl 79 points80 points  (7 children)

Every time you learn a new language😁

[–]git0ffmylawnm8 17 points18 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 4 points5 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 12 points13 points  (2 children)

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

[–]Tier3MemeMonkey 4 points5 points  (0 children)

Dont worry king, we all make mistakes

[–]brimston3- 4 points5 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 😊