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.
Conversation
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
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
read image description
ALT
2
1
4
I mean, you're saying this all as though it's absurd but in the cases where you actually want to pass a context I don't really see any alternative.
1
Like sometimes you just have to write crappy awful code that looks like C.
1
Today in Rust I'd write it exactly like that but it would use ManuallyDrop so people can super easily forget to free it.
1
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
Wait, is this thread proposing doing that for *everything?*
1
Pretty much! It think that's what ATS does at least. Gankro makes a good point about how irritating it would be with things like ref counting though.
I think even if the language worked that way, at the very least you'd want a trait and macro for the trivial case. #[auto_drop] on your function or whatever.



