Controversial ideas I am strongly in favor of: - #[repr(boxed)] - Give Rc<T> and Arc<T> copy semantics.https://twitter.com/withoutboats/status/931343231681380352 …
-
-
Opt out per crate? It would be anarchy! Incrementing the ref count is so cheap, in what use case can you afford refcounting but not incrementing it?
-
A ridiculous amount of effort in the Swift compiler is dedicated to trying to remove copies of (A)Rcs. It adds up, especially if you use them for CoW.
-
But Rust has lightweight references, so it seems like less of a common problem.
-
For me it's less about saving the clone and more about high perf crates wanting to pay more attention to accidentally using Rc heavy patterns. It shouldn't be the default but I should be able to ask for it.
-
I guess an allow by default lint would be acceptable here.
- End of conversation
New conversation -
-
-
A finer grained epoch-like per crate mechanism for this sounds pretty neat tbh.
-
I _think_ "copy semantics for Rc and Arc" isn't hard to hack together might try a poc compiler patch later.
-
The surface API is `unsafe trait AutoClone: Clone { }`.
-
Yep that is what I'm thinking, except it's an autotrait somehow. The autotrait part is tricky with the bound so I can ignore it for poc.
-
It shouldn't be an autotrait - Copy isn't.
-
Strong confirm. I was strongly in favor of that change after getting bitten hard by the pedagogy of OIBIT Copy over and over.
-
everyone hates oibits




-
you should see niko's notes on defining the precise rules around oibits, they ruin everything.
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.