Re:Show HN: Beef, a new performance-oriented programming lan...
by MrBuddyCasino on Thursday January 09, 2020 @12:31PM
(#22003344)
> Rust, Ada, and (it seems) Beef sacrifice performance for memory safety here by having runtime bounds checking
Its not all black and white though. Using iterators, bounds checks can often be elided by the Rust compiler.
The more important part of memory safety is preventing out-of-bounds accesses. Rust, Ada, and (it seems) Beef sacrifice performance for memory safety here by having runtime bounds checking. (Though there is not much performance cost to this and all of those have options to turn off runtime bounds checking anyway.)
The only performance-oriented language I'm aware of that is fully memory-safe at compile time is ATS‚ via a combination of linear types and dependent types, and using ATS is… cumbersome.