News for hackers. Stuff that matters.
Re:All C++20 core language features with examples by account4mypc on Wednesday April 07, 2021 @01:13PM (#26727795)
I don't think it's really as bad as this...

> Waiting for Cross-Platform standardized SIMD vector datatypes

We sort of have this? compiler loop vectorization is, effectively, this. Granted it's not standardized.

> nonstandard extensions ... to run computations in parallel on many cores

std::thread?

> Debugging cross-platform code using couts, cerrs and printfs

True, but i think this is not the language's fault. C/C++ debugging tools are great (the best?).

Debugging any sort of meta-programming is a mess; would definitely agree w/ that. hopefully concepts will help.

> Forced to use boost for even quite elementary operations on std::strings.

This one i agree with.

Re:All C++20 core language features with examples by brandmeyer on Wednesday April 07, 2021 @01:45PM (#26728245)
IMO, you need to raise your expectations.

> > Waiting for Cross-Platform standardized SIMD vector datatypes

> We sort of have this? compiler loop vectorization is, effectively, this. Granted it's not standardized.

Auto-vectorization isn't remotely capable of what an engineer is capable of doing through intrinsics.

> > nonstandard extensions ... to run computations in parallel on many cores

> std::thread?

Compare that to the capabilities provided by Thread Building Blocks.

Re:All C++20 core language features with examples by slavik81 on Wednesday April 07, 2021 @11:53PM (#26734931)
TBB is a great C++ library, but it seems like the existence of great C++ libraries should a point in favour of C++, not a point against it.
Re:All C++20 core language features with examples by shaklee3 on Thursday April 08, 2021 @12:42AM (#26735161)
So... You're arguing against it by pointing out an excellent library for the language? Was someone forcing you to use std::thread? Of course it won't have as many features as tbb; it's meant to help pthreads users.
Re:All C++20 core language features with examples by brandmeyer on Thursday April 08, 2021 @01:47AM (#26735471)
Not exactly. I am reminded of n3557. The ability to write a library like TBB is a positive. But much richer libraries are just barely over the ridge. std::thread is not much more interesting than the abstractions provided by Boost in the early 00's.

http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2013/n355...

Re:All C++20 core language features with examples by shaklee3 on Thursday April 08, 2021 @09:24AM (#26738397)
Part of the job of the library is to be boring. It's the reason third party libraries exist in the first place. They give you the basic starting points to get the job done.

Look how many people are complaining on here about how complicated c++ is. If something like tbb was integrated they would be all over it.

Re:All C++20 core language features with examples by sedatk on Wednesday April 07, 2021 @06:30PM (#26732319)
> std::thread?

They probably meant something more declarative, along the lines of OpenMP.

Re:All C++20 core language features with examples by summerlight on Wednesday April 07, 2021 @10:55PM (#26734582)
https://en.cppreference.com/w/cpp/algorithm/execution_policy...

Most STL algorithms can be executed in parallel from C++17.

Re:All C++20 core language features with examples by gpderetta on Wednesday April 07, 2021 @06:49PM (#26732546)
so... openmp?

It is standardized and widely implemented, just not part of the C++ standard itself.