Re:Ask HN: Will Rust ever become a mainstream systems progra...
by parenthephobia on Monday April 10, 2017 @05:56PM
(#14082906)
Compile-time checking of owned and borrowed references was in Vala, a C#-inspired language for the GNOME ecosystem, four years earlier.
[ Parent
| on HN ]
Re:Ask HN: Will Rust ever become a mainstream systems progra...
by steveklabnik on Monday April 10, 2017 @09:12PM
(#14084068)
Doesn'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_ma...
Re:Ask HN: Will Rust ever become a mainstream systems progra...
by ssokolow on Tuesday April 11, 2017 @10:52AM
(#14088356)
From 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.
Re:Ask HN: Will Rust ever become a mainstream systems progra...
by steveklabnik on Tuesday April 11, 2017 @11:45AM
(#14089083)
Yeah, that's what I thought. Which is very different than most Rust code!
Re:Ask HN: Will Rust ever become a mainstream systems progra...
by parenthephobia on Tuesday April 11, 2017 @12:29PM
(#14089665)
Yes, 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
Re:Ask HN: Will Rust ever become a mainstream systems progra...
by steveklabnik on Tuesday April 11, 2017 @12:47PM
(#14089866)
Rust 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!