Conversation

Jarkko Sakkinen

fallible drop would be a great addition for rust

I don't really ever use Drop trait for this reason.

#rust #rustlang
1
0
0

@jarkko
Yes, but what should happen if the drop fails? Should there be like a pontentially added implicit question-mark at the end of _every_ block? I think there are two more reasonable ways to handle a failed drop, either panic or (log and) ignore. And those are both easy to implement in the drop function as needed.

1
0
0
@rkaj if you ask that question you already align with my view that infallible only drop is not a great thing.
0
0
0