5 ms·
There is also Type-After-Type: https://dl.acm.org/doi/10.1145/3274694.3274705 https://dl.acm.org/doi/10.1145/3274694.3274705 (though maybe that's covered by w
by azakai 3y ago
There is also Type-After-Type:
https://dl.acm.org/doi/10.1145/3274694.3274705 https://dl.acm.org/doi/10.1145/3274694.3274705
(though maybe that's covered by what the author meant by "arenas").
- verdagon 3y agoThis is one of the other three secret blends that I think could bring memory safety to C++! I wrote a bit about using type-after-type as the basis for an entire language (Arrrlang, with a parrot mascot) in my last article [0] and a little bit in a post about memory safety for unsafe languages [1] which we eventually talked about at Handmade Seattle. The downside is the extra memory usage, but I think we can combine it with temporary regions [2] to reduce it pretty drastically. TIL the phrase type-after-type! I've also heard it referred to as type stability. [3] [4] If you squint, this is what we often do manually with Rust when the borrow checker influences us to use indices/IDs into central collections. [0] https://verdagon.dev/blog/myth-zero-overhead-memory-safety https://verdagon.dev/blog/myth-zero-overhead-memory-safety [1] https://verdagon.dev/blog/when-to-use-memory-safe-part-1#the-safer-way-to-use-mmm-languages https://verdagon.dev/blog/when-to-use-memory-safe-part-1#the... [2] https://verdagon.dev/blog/zero-cost-borrowing-regions-overview https://verdagon.dev/blog/zero-cost-borrowing-regions-overvi... [3] https://www.usenix.org/legacy/publications/library/proceedings/osdi96/full_papers/greenwald/node2.html https://www.usenix.org/legacy/publications/library/proceedin... [4] https://engineering.backtrace.io/2021-08-04-slitter-a-slab-allocator-that-trusts-but-verifies/ https://engineering.backtrace.io/2021-08-04-slitter-a-slab-a...