this post was submitted on 09 May 2026
72 points (91.9% liked)

Programming

26909 readers
263 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

aka "bros: in order to be rich, just don't be poor."

you are viewing a single comment's thread
view the rest of the comments
[–] JakenVeina@midwest.social 43 points 4 days ago (2 children)

To be clear, he's not saying "just code better", as the title implies. It's a really poor choice of title.

you are going to mess up somewhere and get leaks, stray pointers, etc. This is true independently of how conscientious you are with your allocations:

He goes on to say, effectively, "Don't use new/delete/malloc/free if you can help it. Use smarter mechanisms."

[–] sik0fewl@lemmy.ca 5 points 3 days ago

Ya, I don’t think he actually said that since it’s not mentioned in the referenced article. What’s actually meant is “by writing code that doesn’t have any memory management”.

[–] avocado@programming.dev 1 points 3 days ago* (last edited 3 days ago) (1 children)

C++'s so called smarter mechanisms are ugly af. I would rather my RAM crash and burn than use its standard library.

[–] chunes@lemmy.world 4 points 3 days ago (1 children)

yeah. I'd rather use C and statically allocate everything up front, even if that's not a great fit

[–] sobchak@programming.dev 2 points 3 days ago

When I did embedded programming that's what I did. Nothing was dynamically allocated. It also allowed me to write a debugger that would watch how variables changed by just directly reading from memory, chart them, and and stuff like that.