I played around with ranges in dlang. The idea of C++ ranges kind of originates from there. In D it's very easy to use and the standard library lets you write beautiful code with it.
C++ made it so ugly. Especially if you wanna implement a custom range.
I can recommend this article by Andrei Alexandrescu, if you are interested in the idea of ranges.
I think that the original boost.range (form 2003) predates ranges in D. There is a continuous evolution from the original boost range, boost range v2 and std range.
C++ made it so ugly. Especially if you wanna implement a custom range.
I can recommend this article by Andrei Alexandrescu, if you are interested in the idea of ranges.
https://www.informit.com/articles/printerfriendly/1407357