r/cpp • u/Different_Peach99 • May 07 '26
Great to be back to C++!!!
I went to Java then Scala... then realized my code's performance sucked and C++ 17 was awesome and the portability issue is now moot.
Plus NASA's guidelines for coding where you allocate all you need upfront and never again suits me fine to not need that time consuming performance killing garbage collector.
Just to say glad to be back!
89
Upvotes
55
u/thisismyfavoritename May 08 '26
first rule of programming: benchmark. You sure your code is faster
25
u/RazzmatazzLatter8345 May 08 '26
Awesome. Now start using C++20+! Life without concepts is not a life worth living.
7
u/mohamed_am83 May 08 '26
I haven't used c++ professionally for 10 years and now would love to get back (have been working in Go since then). What is the path of least resistance to work again with this beautiful language?
3
u/tartaruga232 MSVC user, r/cpp_modules May 08 '26
I did that (Java) in 2008 for a few months and went back to C++. At that shop, they were searching for memory leaks lol. They had dangling references, which prevented the GC from collecting things. This was on a server software piece that was eating up memory.
And then came C++11. And C++17. And C++20. And...
3
u/BusEquivalent9605 May 08 '26
dude lol - look at my comment history
woot C++17!
1
u/ReplacementActive533 May 10 '26
Because C++ has a faster compiler, while Java or Scala may run on a JRE or JVM, which is slow, but Java or Scala may be good if you want to run everywhere with a JRE or JVM installed, while C or C++, only can run on an OS
-8
u/Boonbzdzio May 08 '26
Everyone is saying that performance of Java is worse than C++. This is I think presuming that programmer has certain efficiency and skill in writing performant C++.
-8
u/Easy-Improvement-598 May 08 '26
Never have a issue related to performance while programming with any language what does that tell?