C++20 Ranges
I know I'm not going to make a lot of friends with this opinion, but this is a perfect example of everything that's wrong with modern C++.<p>Seriously who, except for a small circle of academics, actually believes that this is good, readable, concise, maintainable code? Who <i>asked</i> for this?<p>When I read<p><pre><code>    inline constexpr auto for_each = []<
      Range R,
      Iterator I = iterator_t<R>,
      IndirectUnaryInvocable<I> Fun>(R&& r, Fun fun)
        requires Range<indirect_result_t<Fun, I>> {
          return std::forward<R>(r)
          | view::transform(std::move(fun))
          | view::join;
       };
</code></pre>
I can't help but being reminded of Java [1][2].<p>Meanwhile it's 2019 and C++ coders are still<p>- Waiting for Cross-Platform standardized SIMD vector datatypes<p>- Using nonstandard extensions, libraries or home-baked solutions to run computations in parallel on many cores or on different processors than the CPU<p>- Debugging cross-platform code using couts, cerrs and printfs<p>- Forced to use boost for even quite elementary operations on std::strings.<p>Yes, some of these things are hard to fix and require collaboration among real people and real companies. And yes, it's a lot easier to bury your head in the soft academic sand and come up with some new interesting toy feature. It's like the committee has given up.<p>Started coding C++ when I was 14 -- 20 years ago.<p>[1] <a href="https://docs.spring.io/spring/docs/2.5.x/javadoc-api/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.html" rel="nofollow">https://docs.spring.io/spring/docs/2.5.x/javadoc-api/org/spr...</a>
[2] <a href="http://projects.haykranen.nl/java/" rel="nofollow">http://projects.haykranen.nl/java/</a>