Gregor@gregtech.eu to Programmer Humor@programming.dev · 1 year agoC memegregtech.euimagemessage-square13fedilinkarrow-up1229arrow-down118file-text
arrow-up1211arrow-down1imageC memegregtech.euGregor@gregtech.eu to Programmer Humor@programming.dev · 1 year agomessage-square13fedilinkfile-text
minus-squareSpaceNoodle@lemmy.worldlinkfedilinkarrow-up25·1 year agoThis is why I only allocate on the stack
minus-squarexmunk@sh.itjust.workslinkfedilinkarrow-up19arrow-down1·1 year 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-squareKindaABigDyl@programming.devlinkfedilinkarrow-up23·1 year agoFor C++, yes. But “reference” is just a way of using the pointer when it comes to C
minus-squareSpaceNoodle@lemmy.worldlinkfedilinkarrow-up8·1 year agoSure, but that’s technically allocation-agnostic either way.
minus-squareSpaceNoodle@lemmy.worldlinkfedilinkarrow-up9·1 year 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
I only use the registers.