Scripting languages with life type checking?

Besdies dyon GitHub - PistonDevelopers/dyon: A rusty dynamically typed scripting language , are there any other scripting languages that (1) interface with Rust and (2) has a notion of lifetime / borrowing ?

Basically, I want the distinction of ownership, &, &mut, and moving.

1 Like

Well, most 'scripting' languages have a borrow checker called the garbage collector. This ensures that all references live 'long enough' to be valid, with the usual costs. So such beasts as you describe are rare.

1 Like

Garbage collectors aren't really relevant for borrow checking. They are more closely related to drop semantics. I.e. Drop is a garbage collector.

But back on topic, I don't personally know of any language with a notion of borrowing, except Rust. But I found an older conversation about it: https://www.reddit.com/r/ProgrammingLanguages/comments/7b4oea/borrow_checking_in_other_languages_besides_rust/

1 Like