3 ms·
A good way to remember idempotent is to think of the 'delete' or 'mark as read' function for gmail. You can delete an email or mark it as read even if it's bee
by gist 7y ago
A good way to remember idempotent is to think of the 'delete' or 'mark as read' function for gmail.
You can delete an email or mark it as read even if it's been done before (on another open screen as an example).
- bklaasen 7y agoActually I think the "summon lift" button is a better example of idempotence. It doesn't matter how many times you mash the button, the lift is coming ASAP, no quicker. Hitting the button when it's lit doesn't cancel summoning the lift.
- gist 7y agoBy 'lift' you mean 'elevator'? When I first read this I thought you meant 'summon lyft' the ride service but then realized what you meant! Interestingly in the 'old days' of elevator operators hitting it multiple times would be either a 'hurry up' for the operator or an annoyance that maybe made it come slower!