News for hackers. Stuff that matters.
Re:Ask HN: What happened to flatbuffers? Are they being used? by tylerhou on Tuesday January 17, 2023 @09:36PM (#34422767)
Copying into a string is a safe default. Also, proto’s API currently returns string references (and not views) so making a copy is required for open source.

(Although now std::string_view is common, I hear rumors that the proto API might change…)

Re:Ask HN: What happened to flatbuffers? Are they being used? by secondcoming on Wednesday January 18, 2023 @05:45AM (#34425302)
I don't think it was about safety. It was because they didn't want to make ABSL part of the public API.
Re:Ask HN: What happened to flatbuffers? Are they being used? by tylerhou on Wednesday January 18, 2023 @03:38PM (#34432734)
Maybe that's true, but safety is an additional concern. You have way more lifetime headaches if you alias the underlying data. Copying avoids all that.