I think I've got a special case where I'm trying to borrow the same variable both as immutable and mutable at the same time due to a kind of circular reference. I know this is not a good programming practice, but in the context I'm working with it makes sense.
An example of the code is here:
The real scenario is a bit different as the
MainLoopContext is being sent down the
Scene object through that
process function because I have an array of systems that use that
MainLoopContext object for various computations, but that context lives outside the library and it can be defined by the end user in his own application. Thus it's implemented as a generic.
The problem is that
MainLoopContext has to hold a reference to the
Scene object because that is also used by user-defined systems.
Is there another way around this? Thanks in advance!