r/cpp • u/antara33 • Dec 17 '23
Cpp std features and tech domains
Hello fello C++ developers!
I been reading a lot this sub and it always comes to the conversation that the std have a lot of things, and that you are expected to learn what its related to your tech domain.
So here is my question:
What parts of the std do you link to what domains?
If you were to recommend someone that aims to build servers what they should start learning, what would you suggest? Why?
Same for other domains ofc, I'm curious on how the experience and language features varies per domain and usage, and how you find out what you need or where to search for it.
Edit: it seems that my question was not laid out correctly.
Im not asking specifically about server stuff for my line of work, I'm asking about yours.
So, what do you do? What parts of C++ do you use? Why those?
Sorry if my initial post was unclear!
2
u/victotronics Dec 18 '23
For me, threading is pretty much irrelevant. For you, it should be very important. I also don't care about strings since I only do number crunching. I rarely do anything with more than trivial templating.
Can you find tutorials or books specific to your application?
2
u/antara33 Dec 18 '23
Hey! I laid down the question wrongly.
I meant to ask, for the work you do, what do you use?
I get that it came across as "what its used in server development" and that was 100% my mistake!
2
u/rhubarbjin Dec 18 '23 edited Dec 18 '23
I work in gamedev. Our company has a strict no-STL policy for anything that would allocate memory (e.g., std::sort is fine, std::vector is not).
We ship on multiple platforms where memory allocations must be carefully managed. The STL's allocator infra was deemed insufficient, so the team opted for an in-house library instead.
(I'm merely describing the situation as it is. I'm not judging whether or not that was the correct decision; it was many years before I joined and it would be above my level anyway.)
Fancier stuff (filesystem, network, threads, etc.) is off-limits too. Those need to go through each platform's proprietary API.
2
u/antara33 Dec 18 '23
Thanks for the insight! Since you dont use STL, what parts of the language are most valuable to your use case?
If you were free to use anything from it, what parts of the STL would you take and why?
Are the newer features for latest drafts of any use for you? (in the broad context of being able to use STL entirely)
→ More replies (1)
1
u/pjmlp Dec 18 '23
Most of my work is done in C#, Java and JS/TS.
Since 2006 that I only do 100% C++ applications in hobby projects.
At work, C++ is relegated to native libraries to be consumed by those managed languages, either due to some performance issue, integration with 3rd party libraries, or OS APIs that need to be exposed to them.
1
u/antara33 Dec 18 '23
Thanks for the insight. What kind of software do you develop?
By the languages mentioned I guess web related stuff, right?
2
u/pjmlp Dec 18 '23
Distributed computing, or if you prefer cloud native, backend stuff usually with Web or iOS/Android frontend.
Occasionally Windows/macOS GUI desktop stuff as well.
10
u/Thesorus Dec 17 '23
c++ is a generic multi-paradigm programming language.
at its core, it can do nothing on its own, and do everything.
I don't think any particular part of the std (library?) is linked to any particular domain.
with the exception, maybe, of coroutine which will be useful for networking/multitasking. (if I understand them correctly).
Personally, in my different jobs, we use straight forward C++ and basic std library stuff (containers, algorithms) which work for 90% of our work (engineering, graphics... ); either we re-invent the wheel for our needs or buy 3rd party C++ libraries.
For the rest, we use C#, Python and web oriented stuff (javascript, react, ...)