News for hackers. Stuff that matters.
Re:C++20 Ranges by dman on Saturday December 22, 2018 @06:36PM (#18743145)
This looks like something a library author would write while implementing a range and not something that end users would write while using ranges. Could you point to an implementation in a different language that offers a similar abstraction in a more succinct manner (While offering the same type safety and low runtime overhead).
Re:C++20 Ranges by rudolph9 on Saturday December 22, 2018 @06:56PM (#18743282)
Re:C++20 Ranges by dfbrown on Saturday December 22, 2018 @07:43PM (#18743562)
No, ranges in C++ are analogous to the iterator trait in rust
Re:C++20 Ranges by danbolt on Saturday December 22, 2018 @06:54PM (#18743269)
I feel like what you’re touching at is kind of the core of why C++ can be so difficult to parse through sometimes. It really is trying to make a general purpose abstraction while also having a low overhead. This results in a need for detail and complexity that you can simply not need to worry about in languages like Python or Clojure.

When my university peers and I were learning C++, a lot of us strongly preferred using C99 since it didn’t seem as awful in terms of complexity and verbosity.

Re:C++20 Ranges by 12298765 on Saturday December 22, 2018 @10:25PM (#18744205)
Check out Go