News for hackers. Stuff that matters.
Re:Comparison between Rust and D by kibwen on Monday June 27, 2016 @12:30AM (#11984212)

  > When I split linked list in two, the new list must 
  > somehow become the owner of the newly detached elements.
Yes, which is what `split_off` is already doing. It doesn't take unsafe code or breaking the "Rust memory management model" to achieve this; ownership transfer is a fundamental part of the language. The `split_at_node` function that I describe could simply copy the implementation of the existing `split_off` function while removing the part where `split_off` iterates through the list to find the node at the specified index (which is the O(n) part of the function).

There are no comments on this comment yet.