Rust lifetimes and collections [OT]
Vladimir Panteleev via Digitalmars-d
digitalmars-d at puremagic.com
Wed Nov 19 10:53:50 PST 2014
On Wednesday, 19 November 2014 at 17:58:01 UTC, Andrei
Alexandrescu wrote:
> On 11/19/14 8:54 AM, bearophile wrote:
>>
>> This is nice:
>>
>>> fn split_at_mut(&mut self, mid: uint) -> (&mut [T], &mut [T]);
>>
>> Bye,
>> bearophile
>
> Why did this redditor say it's a horrific hack?
> http://www.reddit.com/r/programming/comments/2mqyd3/rust_lifetimes_and_collections/cm6yj7b
Probably because it performs extra work (which may or may not be
optimized out) just so it fits in Rust's safety model.
More information about the Digitalmars-d
mailing list