DEV Community

Discussion on: Explain "Memory Safe Programming Languages" Like I'm Five Please

Collapse
 
citronbrick profile image
CitronBrick • Edited

Memory safe languages are like the bank.

  1. You give them your money.
  2. You don't know into which box it goes.
  3. The bank returns your money correctly, when asked

Memory unsafe languages are like a treasure ground in which you & a lot of others hide treasure.

  1. You have to find a free spot.
  2. Dig deep/large enough to hide your treasure depending on it's size.
  3. If you forget the spot, your treasure is lost.
  4. If someone else forgets his/her spot, & digs up yours, your treasure is lost.