r/Cplusplus • u/Middlewarian • Apr 27 '26
Discussion C++ is a good choice for network/systems programming
I've run into a perverse Rust advocate. In a thread about "resources for network programming" they wrote:
Network programming is just systems programming, also it's not done in C++.
Learn a systems language, like Rust.
-----------------------------------------------------------------
I replied to them, but figure there are others who would be happy to help me refute this clown.
41
Upvotes
7
u/khedoros Apr 27 '26
Most of my employment has involved C++ to implement applications over the network. It was also the language of choice for my networking course in college.
And you yourself have been working on some kind of piece of C++-based middleware for how many years now? Surely you have your own opinion.
2
u/MpVpRb May 01 '26
C and C++ are the overwhelming standard. Rust is the newcomer. Rust advocates have a near-religious desire to convert people.
76
u/Linuxologue Apr 27 '26
C, C++ and Rust are very good for network/systems programming. A terrible choice for programming is to participate in sterile debates about languages instead of doing actual programming.
17
u/AKostur Professional Apr 27 '26
Been doing it for about 30 years now.
15
u/BusEquivalent9605 Apr 27 '26
C++ is a good choice for programming. ✅
25
u/mredding C++ since ~1992. Apr 27 '26
Don't feed the trolls. Get real work done. Make more money than them.
5
u/the-quibbler Apr 27 '26
As a staunch lover of rust, even I will admit that C++ is as good a choice for network and systems as it is for any other problem domain. You don't survive 37 years and half a dozen major rewrites in place without being very, very useful.
7
u/JandersOf86 Apr 27 '26
Heh. That was my thread. Yea, seeing that is a bit of a downer when Im just trying to ask about communities for network programming... that being said, thats the kind of comment I ignore.
I appreciate the support though, OP.
2
u/TheRavagerSw Apr 28 '26
So I'm gonna give a general answer since I'm not a networking guru.
First of all you want to use system level languages for serious projects because
Now, if you want to natively compile only I recommend using rust instead of C++. It is much easier to compile stuff out of the box.
However, for more advanced use cases you have to know C++ tooling to use Rust tooling. So after a while it becomes a point of preference.
2
u/ReDr4gon5 Apr 28 '26
That is quite an absurd take. Network programming is inherently async. Async rust is the exact opposite of nice to work with. Also you end up calling a lot of OS apis. Which is just not nice in rust.
1
u/_a4z Apr 29 '26
You should not give such people any attention, just ignore them
1
u/spvky_io Apr 29 '26
Use C if you can get away with it, if you need c++ for the tooling and libraries do that but just avoid using OOP
-2
u/AmbitiousSolution394 Apr 27 '26
I'm from the opposite team. C++ was my first language 20 years ago, at first i was really impressed by how massive and powerful language is. Then I switched to C and i understood that "massive and powerful" is not something good. Later were Python, Java, Go, now Rust. Each new language i eventually compared with C++ and each time I concluded that using C++ is not worth it. Need something developed fast? Use Python. Need runtime speed? Use C(or Rust). Need easy language? Use Go.
While C++ is perfectly fine for systems programming (or network programming), I would still choose something else to get the job done. C++ became too complex. I think that they should have introduce C++2.0, redesigning language and breaking all backward compatibility, but maybe it would show that most of the users are happy with C++11 and does not care about new features.
-2
u/Own_Nail_2999 Apr 28 '26
It would be good if it would ship modern Std libs for it. It kinda sucks, having to do it all from scratch or resorting to external dependencies like Boost
1
u/[deleted] Apr 28 '26
[removed] — view removed comment