• Justin@lemmy.jlh.name
    link
    fedilink
    arrow-up
    10
    ·
    edit-2
    1 year ago

    Wouldn’t any sort of C++/Java/Rust Array/Vector work for this? You still have the possibility for runtime panics, but you’re never going to dereference an invalid memory address with those abstractions.

    If the goal is to prevent any sort of runtime error with arrays, I’m thinking you’ll have to set some strict boundaries or risk running against the limits of computability.