Imagine kids coloring a pentagonal star on drawing paper. Suppose that you have to color each triangular portion, but not the center.
If you're not a smart, experienced kid, you will color outside the lines. Sometimes by accident, sometimes because you're not experienced enough.
Languages that are not memory-safe are like that. Error prone, but fine for experienced kids.
Contrast that with having a stencil, maybe of triangular shapes. You will be far more tidy in your goal. The stencil is tool the likes of which are built into memory safe languages. Constrain your reach. Go wild with the coloring, but the paper only receives it in the necessary spots.
All analogies break down when you then say "There is no garbage collector in a stencil"
Imagine kids coloring a pentagonal star on drawing paper. Suppose that you have to color each triangular portion, but not the center.
If you're not a smart, experienced kid, you will color outside the lines. Sometimes by accident, sometimes because you're not experienced enough.
Languages that are not memory-safe are like that. Error prone, but fine for experienced kids.
Contrast that with having a stencil, maybe of triangular shapes. You will be far more tidy in your goal. The stencil is tool the likes of which are built into memory safe languages. Constrain your reach. Go wild with the coloring, but the paper only receives it in the necessary spots.
All analogies break down when you then say "There is no garbage collector in a stencil"
There is a garbage collector: it's called white-out.