logoalt Hacker News

jvanderbot • today at 12:28 PM • 2 replies • view on HN

I'm not defending rust here - a correctness bug invalidates the premise. But I am saying that I've never seen a custom drop in production.

For some reason this is controversial, but it remains true.


Replies

bryanlarsen • today at 12:46 PM

You said/implied 2 things:

- you've never written a custom Drop

- "Not really". Implying that your experience generalizes

I've written a bunch of rust programs without custom Drop. I believe your first statement. There are large classes of programs that don't need it. There are also many that do. I think your statement says a lot more about what kind of programs you work on than about custom Drop not being common. People are downvoting the implication that custom Drop is not a common pattern.

cmrdporcupine • today at 12:32 PM

Custom drops are all over the place. As others have said.

But not custom drops that are doing variadic type stuff like this, usually.