Re:Why did we choose Rust to develop TiKV?
by Koshkin on Wednesday September 27, 2017 @01:03PM
(#15349822)
Sure, and that is a special case I was referring to. (Another one would be a class factory method returning a unique pointer to an interface.)
In general, though, passing a unique_ptr around is a bit cumbersome as this requires calling std::move way too often.
I mean, if you only view functions as being called for side effects, then yeah maybe. But if you're constructing a data pipeline, unique_ptr in and out makes a lot of sense.