Well-designed interfaces avoid irreversible or destructive actions. Rather than patching them over with an “Are you sure?” dialog, they strive to make every action undoable.
Some unusual examples:
In Gmail, you can undo sending an email (it delays sending it for several seconds)
You can undo almost any operation in Git, including complex destructive actions.