3 ms·
Compile-time checking of owned and borrowed references was in Vala, a C#-inspired language for the GNOME ecosystem, four years earlier.
by parenthephobia 10y ago
Compile-time checking of owned and borrowed references was in Vala, a C#-inspired language for the GNOME ecosystem, four years earlier.
- steveklabnik 10y agoDoesn't Vala use reference counting? [1] I'm not actually sure; do you have some pointers I could read here? 1: http://www.vala-project.org/doc/vala/Overview.html#Memory_management http://www.vala-project.org/doc/vala/Overview.html#Memory_ma...
- ssokolow 10y agoFrom what I remember, it just uses GLib's system for implementing reference-counted pointers in C and is equivalent to using Rc<T> or Arc<T> everywhere in Rust.
- steveklabnik 10y agoYeah, that's what I thought. Which is very different than most Rust code!
- parenthephobia 10y agoYes, but so does Rust. Reference counting is orthogonal to, although related to, to borrow checking. Vala's wiki has a page all about its ownership mechanism: https://wiki.gnome.org/Projects/Vala/Ownership https://wiki.gnome.org/Projects/Vala/Ownership
- steveklabnik 10y agoRust does not use reference counting for ownership, or borrow checking. It is true that you can introduce it for your own types though, with Rc/Arc. That's not really "rust using" it though; it's just a library. Thanks for the link, I'll dig in!