Thread with 5 posts
jump to expanded postexciting programming problem in touchHLE: supporting inheritance for instance variables. look at how gnarly this is:
https://github.com/hikari-no-yume/touchHLE/commit/ae5b7a8d6513e3204d3c2eab1f250cdcf8930ee5
i have an idea for a neater solution, but it will involve descending further into the land of Any
s and 'static
s and 'a
s and dyn
s :3
THE BAD NEWS: i have ran head-first into the borrow checker struggling with mutable borrows in loops again ;_;
THE GOOD NEWS: unsafe { &mut *(a as *mut _) }
is my friend and would never hurt me :3
@hikari noooooo
@hikari more constructively, can you use RefCell instead
@jrose I mean I could but I'd rather do that for an actually good reason, not to work around non-lexical lifetimes not working properly with loops that have early returns