3 ms·
I guess C++ has the best names after all, Rust should have emulated those (except it couldn't - string_view came after Rust and maybe even was inspired by Rust.
by kzrdude 4y ago
I guess C++ has the best names after all, Rust should have emulated those (except it couldn't - string_view came after Rust and maybe even was inspired by Rust.)
- cmrdporcupine 4y agoChromium's C++ StringPiece dates back to at least 2012, and pretty sure Google had something similar (I forget the original name) to it in Google3's C++ base library which became abseil's string_view before that even. And Boost had string_ref at least as far back as 2013. https://chromium.googlesource.com/chromium/src/base/+/master/strings/string_piece.h https://chromium.googlesource.com/chromium/src/base/+/master... https://github.com/abseil/abseil-cpp/blob/master/absl/strings/string_view.h https://github.com/abseil/abseil-cpp/blob/master/absl/string... https://github.com/steinwurf/boost/commits/master/boost/utility/string_ref.hpp https://github.com/steinwurf/boost/commits/master/boost/util... All of this is arguably before Rust's influence would have been anything to speak of.
- berkut 4y agoGoogle had StringPiece and LLVM had StringRef in 2012 and provided similar functionality. https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3442.html https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n34... No mention of Rust there I can see.