Re:Modern C++ Won't Save Us
by ncmncm on Tuesday April 23, 2019 @08:15PM
(#19734354)
Could you write a Rust equivalent of the STL, or its modern cousin Ranges? That's just one library (as of C++20), but if Rust is not up to that, there's no point in going further.
[ Parent
| on HN ]
Re:Modern C++ Won't Save Us
by steveklabnik on Tuesday April 23, 2019 @09:21PM
(#19734744)
The equivalent of Ranges is already in Rust’s standard library, and has been forever. We call it Iterator. It also provides extra static guarantees against invalidation.
I see that you did not understand my question.
I see, too, that there are plans for some support for generics in the near future. So the answer might become yes, in time.
Re:Modern C++ Won't Save Us
by steveklabnik on Wednesday April 24, 2019 @11:42AM
(#19739503)
Rust has also had generics for a very long time.