News for hackers. Stuff that matters.
Re:Rust/WinRT Public Preview by pornel on Friday May 01, 2020 @07:48AM (#23041106)
Rust's borrow checker solves the problem of "get a reference to something interior, and the parent is deallocated". It knows (by static analysis) when an inner reference may be in use, and won't let the program compile if the parent could deallocate during that time.

This works well even with externally refcounted objects. You can give reference to an inner object without increasing its refcount, and rely on the borrow checker not to allow the parent to decrease the refcount. Or you bump the refcount of the inner object and give it out as an independently owned object.

Re:Rust/WinRT Public Preview by ridiculous_fish on Friday May 01, 2020 @05:19PM (#23046619)
WinRT is lousy with functions like Window.Current which provide global access to the current window. Any function may get access to any control at any time.