Hacker News new | ask | show | jobs
by wyldfire 2328 days ago
> Range-based for with initialiser

Gee, I would really love something like Python's enumerate() and zip() (but yes, I know that there's alternatives available that are not in the standard library).

> std::format / Python-like formatting library in the Standard Library!

Yes, this is a good addition.

> Ranges / A radical change in how we work with collections!

... but I still have to use verbose warts like std::iota in order to make a collection of integers?

EDIT: no, apparently not. Sanity prevails! (see [1]):

    for (int i : std::views::iota{1, 10})
        std::cout << i << ' ';

[1] https://en.cppreference.com/w/cpp/ranges/iota_view