News for hackers. Stuff that matters.
Re:Abseil: C++ Common Libraries by int_19h on Wednesday September 27, 2017 @05:14AM (#15346074)
> I fail to understand why it's causing this much excitement.

C++ guys just like zero-overhead abstractions. The more we can get, the better. Passing std::string around has always been a sore point, and occasionally prompted misguided optimizations (like refcounting copy-on-write in g++).

Re:Abseil: C++ Common Libraries by roel_v on Wednesday September 27, 2017 @05:49AM (#15346221)
Well yes, I'm what one would call a 'C++ guy' myself. Don't pass around, pass around const std::string&. What I see left and right is people saying 'you'll never pass a const std::string& any more!'. The way I see it: you'd pass a string_view in the cases where, in the past, you would have had to copy a part out of a string (which is rare, except in parsers), or when dealing with char* API's; what's better about passing a string_view than passing const string& ?
Re:Abseil: C++ Common Libraries by int_19h on Thursday September 28, 2017 @12:52PM (#15358709)
Nothing. But I would disagree that having to copy a part of a string, or having to pass part of a char buffer that is not a string, is all that rare, even outside of parsers.