merari42@lemmy.world to Programmer Humor@programming.dev · 2 months agoWishUnderflowlemmy.worldexternal-linkmessage-square33linkfedilinkarrow-up1452arrow-down111
arrow-up1441arrow-down1external-linkWishUnderflowlemmy.worldmerari42@lemmy.world to Programmer Humor@programming.dev · 2 months agomessage-square33linkfedilink
minus-squareSavvyWolf@pawb.sociallinkfedilinkEnglisharrow-up31·2 months agoI had a visceral reaction to this because obviously the wish count should be decremented before the wish takes place. Even though I can’t think up a convincing technical argument for it.
minus-squareSkullgrid@lemmy.worldlinkfedilinkarrow-up4·2 months ago I had a visceral reaction to this because obviously the wish count should be decremented before the wish takes place. Why? Shouldn’t you decrement the limited resource the user has access to in case the thing you are doing fails?
minus-squaretyler@programming.devlinkfedilinkarrow-up1·2 months agoYou’d need a check to make sure they don’t wish for something not allowed (like more wishes).
I had a visceral reaction to this because obviously the wish count should be decremented before the wish takes place. Even though I can’t think up a convincing technical argument for it.
Why? Shouldn’t you decrement the limited resource the user has access to in case the thing you are doing fails?
You’d need a check to make sure they don’t wish for something not allowed (like more wishes).