Comment

Comment by rsp1984

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++.

Seriously who, except for a small circle of academics, actually believes that this is good, readable, concise, maintainable code? Who asked for this?

When I read

    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;
       };
I can't help but being reminded of Java [1][2].

Meanwhile it's 2019 and C++ coders are still

- Waiting for Cross-Platform standardized SIMD vector datatypes

- Using nonstandard extensions, libraries or home-baked solutions to run computations in parallel on many cores or on different processors than the CPU

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

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

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.

Started coding C++ when I was 14 -- 20 years ago.

[1] https://docs.spring.io/spring/docs/2.5.x/javadoc-api/org/spr... [2] http://projects.haykranen.nl/java/

parent rsp1984 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton