this post was submitted on 21 Nov 2023
316 points (94.9% liked)

Programmer Humor

32361 readers
491 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] xmunk@sh.itjust.works 50 points 11 months ago (3 children)

C++ the good parts exclusively uses on stack allocation and passing by const reference without ever introducing pointers.

You know this to be true.

[–] SzethFriendOfNimi@lemmy.world 39 points 11 months ago (3 children)

Pointers is a pathway to memory that some consider to be… unnatural

[–] Dudewitbow@lemmy.zip 15 points 11 months ago (2 children)

Because its essential for application use where memory management becomes extremely vital, usually due to the rom or memory to be extremely linited in size. Worrying about memory management (something C++ makes mandatory) is something not all programmers need to care about, but having automated memory mangement is also what causes bloat that comes with modern applications, due to bad programming practices of not caring about it.

[–] SzethFriendOfNimi@lemmy.world 10 points 11 months ago

Only Garbage Collectors deal in absolutes

[–] xmunk@sh.itjust.works 11 points 11 months ago

I tried to get that reference, but MemoryAccessOutOfBounds.

[–] aport@programming.dev 13 points 11 months ago (1 children)

This is basically C++ in the embedded world, and yes it's the only good C++

[–] xmunk@sh.itjust.works 2 points 11 months ago

Also Qt basically forces you into this mode... and yea, it is a better way.

[–] marcos@lemmy.world 4 points 11 months ago

Only integral unsigned numbers, no reference taking at all, no side-effect operators...