Gregor to Programmer Humor@programming.dev • 5 months agoC memegregtech.euimagemessage-square18fedilinkarrow-up1229arrow-down118file-textcross-posted to: programmerhumor@lemmy.ml
arrow-up1211arrow-down1imageC memegregtech.euGregor to Programmer Humor@programming.dev • 5 months agomessage-square18fedilinkfile-textcross-posted to: programmerhumor@lemmy.ml
minus-square@SpaceNoodle@lemmy.worldlinkfedilink26•5 months agoThis is why I only allocate on the stack
minus-square@xmunk@sh.itjust.workslinkfedilink19•5 months agoPeople who are enthusiastic about using pointers in C++ are doing it wrong. Never use a pointer when you can get away with a reference.
minus-square@KindaABigDyl@programming.devlinkfedilink23•5 months agoFor C++, yes. But “reference” is just a way of using the pointer when it comes to C
minus-square@SpaceNoodle@lemmy.worldlinkfedilink8•5 months agoSure, but that’s technically allocation-agnostic either way.
minus-square@SpaceNoodle@lemmy.worldlinkfedilink9•5 months agoThis guy gets it Static allocation for the SIL ratings
This is why I only allocate on the stack
People who are enthusiastic about using pointers in C++ are doing it wrong. Never use a pointer when you can get away with a reference.
For C++, yes. But “reference” is just a way of using the pointer when it comes to C
Sure, but that’s technically allocation-agnostic either way.
Based nasa compliant engineer
This guy gets it
Static allocation for the SIL ratings
Stack overflow intensifies
I only use the registers.