2 ms·
Yeah, I’ll admit it’s hard to get your head around. I had to think about it a couple of times just writing that explanation. It took me a couple of minutes to
by MBCook 2y ago
Yeah, I’ll admit it’s hard to get your head around. I had to think about it a couple of times just writing that explanation.
It took me a couple of minutes to figure out why it was in the function definition. I guess it had to be but that wasn’t obvious to me at all at first.
> And the compiler effectively automatically notates literally everything
Right. Just like how all classes in Java extend Object even though you don’t have to literally write it.
I believe they’re still working on a more Rust-like borrowing system, but I could be wrong. I know this helped them implement parts of the standard library much better because they could make assumptions that you can’t make with copyable objects.
I do get your point about just calling it NotCopyable. I don’t actually know why they settled on the name they did, I didn’t ever try to look that up. Maybe it’s because it’s a special thing that requires compiler machinery and there’s no way for you to make an equivalent?