I don’t have a formal theory background - can you help me understand what a generative existential is?
I had run into similar issues trying to create a graph structure, and my solution which can currently only be implemented by ignoring a lot of Rust’s safety checks was potential borrows. Essentially you’d have a
RefCell type structure with a pointer to the data and a lifetime that doesn’t represent a borrow but can be turned into one, at which point the regular checks are done at runtime. This is essentially the “fat lifetime” I thought I saw a mention of, but it doesn’t address foreign libraries like @spease is trying to use.
I’d like to see more ideas about ways to improve C interop without resorting to unsafe code. Issues like this where you need to wrap everything in
Rc make me think I might as well use C#, and when everything needs tedious unsafe workarounds then I’d might as well use C++. As it is, trying to use the Windows API in Rust makes C++ feel like a scripting language. I think it should and could be the other way around given some thought.