You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only reason there is the restriction is because of bad coders and lazy GC. However, I'd like there to be an option to explicitly allow this. Certain things simply cannot be accomplished due to actual VM limitations but can be bypassed by encapsulating data.
One cannot do this:
function doFoo( int[] bar )
; blah
endfunction
function threadFoo( int[] bar )
var[] varpar = new var[ 1 ]
varpar[ 0 ] = bar
callfunctionnowait( "doFoo", varpar )
endfunction
However, one could encapsulate that:
struct __FooParams
int[] bar
endstruct
function __FooParamsDispose( __FooParams params )
params.bar = None
endfunction
function __doFoo( __FooParams params )
; blah
__FooParamsDispose( params )
endfunction
function doFoo( int[] bar )
__FooParams params = new __FooParams
params.bar = bar
__doFoo( params )
endfunction
function threadFoo( int[] bar )
__FooParams params = new __FooParams
params.bar = bar
var[] varpar = new var[ 1 ]
varpar [ 0 ] = params
callfunctionnowait( "__doFoo", varpar )
endfunction
Was able to do this with Fallout 4 and the CK Compiler Patch - would be great if Caprica supported this too. The VM doesn't care, it's just doing instructions, as I said - this restriction is just due to bad coders and lazy GC.
Edit: fixed typos and added code tags
The text was updated successfully, but these errors were encountered:
The only reason there is the restriction is because of bad coders and lazy GC. However, I'd like there to be an option to explicitly allow this. Certain things simply cannot be accomplished due to actual VM limitations but can be bypassed by encapsulating data.
One cannot do this:
However, one could encapsulate that:
Was able to do this with Fallout 4 and the CK Compiler Patch - would be great if Caprica supported this too. The VM doesn't care, it's just doing instructions, as I said - this restriction is just due to bad coders and lazy GC.
Edit: fixed typos and added code tags
The text was updated successfully, but these errors were encountered: