News for hackers. Stuff that matters.
Re:C++20 Ranges by slavik81 on Saturday December 22, 2018 @07:15PM (#18743393)
Most of that code is for optimization or error messages. I think you could strip it down to:

    auto for_each = [](R&& r, Fun fun) {
      return r | view::transform(fun) | view::join;
    };
I also removed inline and constexpr because he didn't need them in his example.

I don't disagree that it's ugly, but it's not as bad as it looks when you go through the standard library. Those are functions that have been written, optimized and generalized to handle all sorts of cases. Your needs are almost certainly more specific, and you will undoubtedly write functions that are much simpler.

That being said, I kind of agree. I would have preferred your list of features to getting Concepts. I find SIMD to be a particular sore spot.

Re:C++20 Ranges by spiritcat on Saturday December 22, 2018 @07:27PM (#18743463)
Do c++ regulars eventually just get numb to how hideous the :: syntax is to look at?
Re:C++20 Ranges by int_19h on Sunday December 23, 2018 @04:13AM (#18745205)
I much prefer having separate operators for namespace/module qualification and member access. These things seem like they have something in common, but in practice, IMO, the languages that separate them are much cleaner.

Whether :: specifically is the best choice of such an operator is another question. But there aren't exactly many options left, and this one is firmly established by now, even outside of C++.

Re:C++20 Ranges by blattimwind on Sunday December 23, 2018 @05:40AM (#18745427)
PHP was changed last minute to use \ which in my opinion is a way worse choice.
Re:C++20 Ranges by int_19h on Sunday December 23, 2018 @09:21AM (#18746196)
That was a horrible choice if only because \ is already well-established for escape sequences (including in PHP itself).
Re:C++20 Ranges by blattimwind on Saturday December 22, 2018 @07:31PM (#18743494)
Not the worst piece of C++ syntax by various orders of magnitude.
Re:C++20 Ranges by klyrs on Sunday December 23, 2018 @01:10AM (#18744718)
I haven't yet... but after I got a bug report for polluting namespaces with my library, I uglified my code like a good citizen.
Re:C++20 Ranges by fermienrico on Saturday December 22, 2018 @09:50PM (#18744102)
It is as if we don't learn! Same thing in Rust. :: is adds so much visual noise.

Julia is the only modern language with beautiful syntax. I think we should pay more attention to the aesthetics of a language just like we do with spoken languages. Certain languages just sound beautiful - Japanese and French.

C++ is old but Rust could have paid more attention to subjective aspects of a language.

Re:C++20 Ranges by feanaro on Sunday December 23, 2018 @12:46AM (#18744658)
> Certain languages just sound beautiful - Japanese and French

You've managed to pick the two languages whose sound irritates me the most, which I think illustrates the fragility of this kind of thinking perfectly.