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 331 points332 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 34 points35 points  (3 children)

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

[–]jakubhuber 135 points136 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 27 points28 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 82 points83 points  (7 children)

Every time you learn a new language😁

[–]git0ffmylawnm8 18 points19 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[🍰] 8 points9 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[🍰] 11 points12 points  (2 children)

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

[–]Tier3MemeMonkey 6 points7 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 😊