Conversation

ergonomics fools: what if Rc autocloned, since it's generally completely unininteresting me, a clarity/orthogonality genius: what if every single place that decremented a reference count had to manually try to run the concrete destructor of its contents. Also screw type erasure.
1
3
omg lol imagine giving a shit about API/ABI stability under this system. "every type in my API exposes a dummy destructor function that you have to manually call because one day they might be changed to contain an allocation that needs to be cleaned up"
1
2
Well you could do like what swift and std::shared_pointer do and define a minimal ABI for the refcounted box, with a destructor pointer at a common place within the box, and then put release (or at least its cold path) behind the ABI boundary
1
1
I'm not talking about a nasty technical issue, I'm talking about needing to constantly handwrite this everywhere in a world with no dtors, defer, linear types, and API stability
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=11f78aa9b378584c010916de3a864b64
2
4
the existence of cases which Drop doesn't handle elegantly is not a good argument for making everyone always suffer the tools to effectively handle those cases, which is the suggestion i was replying to
1
2