Cows Look Like Maps@sh.itjust.works to Programmer Humor@programming.dev · 1 year agoBill is a pro grammersh.itjust.worksimagemessage-square17fedilinkarrow-up18arrow-down10
arrow-up18arrow-down1imageBill is a pro grammersh.itjust.worksCows Look Like Maps@sh.itjust.works to Programmer Humor@programming.dev · 1 year agomessage-square17fedilink
minus-squaremagic_lobster_party@kbin.sociallinkfedilinkarrow-up2·1 year agox += 1; // Increases x by one
minus-squareautokludge@programming.devlinkfedilinkEnglisharrow-up1·edit-21 year ago…Years later x += config.increment; // Increases x by one """ config.yaml increment: -2 """
minus-squaretowerful@programming.devlinkfedilinkarrow-up0·edit-21 year ago// increase the dynamically allocated memory space of a word sized integer stored at the memory address represented by the symbol "x" by the integer 1 and terminate the instruction
minus-squareAnders429@programming.devlinkfedilinkarrow-up1·1 year agoWhy the heck does it need to be dynamically allocated? Just put that puppy on the stack.
minus-squaretowerful@programming.devlinkfedilinkarrow-up1·1 year agoThat’s what it used to do. But it was a bug, and the code has been fixed.
minus-squaremorrowind@lemmy.mllinkfedilinkarrow-up1·1 year agoWait why is it dynamically allocated and why are you increasing the memory. Something is very wrong here
x += 1; // Increases x by one
…Years later
x += config.increment; // Increases x by one
""" config.yaml increment: -2 """
// increase the dynamically allocated memory space of a word sized integer stored at the memory address represented by the symbol "x" by the integer 1 and terminate the instruction
Why the heck does it need to be dynamically allocated? Just put that puppy on the stack.
That’s what it used to do.
But it was a bug, and the code has been fixed.
Wait why is it dynamically allocated and why are you increasing the memory. Something is very wrong here