website/content/posts/print-hello-world-part-1.md
Anthony Wang bb57d239dd
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Update all Gitea links
2022-09-05 15:52:10 -05:00

1.7 KiB

title date draft type tags
print("Hello, world!") - Part 1 2020-09-17 true post
Programming

Originally posted on my old blog

“C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off.”

-- Bjarne Stroustrup, creator of C++

There are a few reasons why the vast majority of competitive programmers use C++: it has a decent standard library, several good reference sources, and lots of tutorials online. But these factors are not unique to C++; what matters is its speed. A few milliseconds could be the difference between and accepted solution and time limit exceeded. Anyways, here's the code, about two weeks late, written in the "conventional" C++ style, as opposed to the condensed, macro-abusing style of competitive programmers.

Factor Rating Description
Speed 3 Very fast after compilation, nearly as fast as C, and faster than a lot of programming languages even counting compilation
Documentation 3 Not that I used any when writing this program, but there a lot of good resources out there, such as cplusplus.com
General 3 C++ has its flaws, but for some applications such as competitive programming, it's unbeatable

Be on the lookout for Part 2, Python! No guarantees about the date, but it should show up in a few days, once I get some time.