3 ms·
Have you actually looked at the co-routine stuff? It is another level of awful, even for C++. The committee screwed that up.
by zarkov99 5y ago
Have you actually looked at the co-routine stuff? It is another level of awful, even for C++. The committee screwed that up.
- afarviral 5y agoNot yet, no. I will look out for it. I am definitely I'm in an early phase where I'm just finding things "cool", without noticing why they might be awful. But I do wonder if there are senior devs on each side of the this C++-is-awful fence?
- zarkov99 5y agoI have done C++ for 15 years, its the only choice in the HFT domain I used to work in. There is nothing that can replace it right now because of its performance, the quality of the compilers and the available library eco-system. But that does not mean that some of C++ corners are not inexcusably obtuse. Co-routines is a new one.
- otabdeveloper4 5y agoYou may think you need async, but you don't. This isn't Python or Javascript, the use case for C++ coroutines is microcontrollers and other things without a functioning modern OS.
- zarkov99 5y agoThat is a bold thing to say. Why do you think this is the case?
- gpderetta 5y agoThe main target for coroutines was networking. And, given enough library sugar, they actually work decently enough there. The other use case is generators and there the hard to remove allocation hurts a lot.
- otabdeveloper4 5y agoThis isn't Python. Nobody needs or asked for coroutines to do networking in C++.
- gpderetta 5y agomany many many people did ask for them. Also, of course you do not need them. You also do not need C++, just a needle and steady hand.
- pjmlp 5y agoUntil you happen to do modern Windows with WinUI/UWP in C++, as not all APIs are exposed to .NET.