3 ms·
> For memory in particular, it's been understood what it takes to have a safe abstraction for quite a long time now, and numerous widely-available languages pro
by mannykannot 11y ago
> For memory in particular, it's been understood what it takes to have a safe abstraction for quite a long time now, and numerous widely-available languages provide one. Use one of those instead of C.
Is it not the implementation of those abstractions that determines whether they are safe? Offhand, I don't recall seeing guarantees of safety in this regard being offered by any language I am familiar with, though I have to admit that it has not been something I have been looking for.
- twic 11y agoIt is the implementation which matters, or rather, the observable consequences of the implementation, which in effect form part of the interface of the abstraction - they might not be intended, but they're there. Those are what we call leaks. The abstraction i was thinking of was byte arrays, which are provided by the language, rather than anything higher-level. Many languages have byte arrays which guarantee that you can't read past the end, and can't read values that you didn't write. Java would be one example.