News for hackers. Stuff that matters.

mikeloomis

Re:C++20 Ranges on Sunday December 23, 2018 @10:24AM (#18746555)
I learned c++ fresh two years ago. While I enjoyed learning python, I had the vomitous reaction to rust, not c++. In fact, I find modern c++ to be quite similar to python for many problems.
Re:C++20 Ranges on Sunday December 23, 2018 @10:19AM (#18746516)
Its very easy and rapidly becoming even easier to write modern c++ code that doesn't have dangling pointers/refs. The built in static analysis that Rust relies on to make its memory safety guarantees is no longer a real advantage. This type of criticism should have stayed in the 00's tbh because it really isn't true now. It's rust which will be playing catch-up to gain feature parity with c++ in the coming decade.
Re:C++20 Ranges on Saturday December 22, 2018 @11:32PM (#18744441)
It'll be after 20 for sure, we're still waiting for the executor TS for async networking to be able to come in.
Re:C++20 Ranges on Saturday December 22, 2018 @05:07PM (#18742735)
A c++20 range is just a bounded container. instead of having to write, `(container.begin(), container.end())` for any function that uses iterators to bound itself, you just write `(container)` and it knows its a range.

The range function in python is similar only in name, the c++20 range concept is not a generator.

2. There is a coroutine feature branch, I believe developed by Gor Nishanov, https://github.com/GorNishanov. Also not related to c++20 ranges.

3. Eric Niebler used a single templated function. This is not anywhere close to template metaprogramming hell, and I think you should look into templates as once you learn about them they become way less intimidating. Also has nothing to do with c++20 ranges.