Re:On the impossibility of composing finalizers and FFI
by adgjlsfhk1 on Tuesday February 27, 2024 @12:47AM
(#39520559)
Julia solves this pretty well by having a gc_preserve macro that tells the compiler that an object has hidden references within the scope.
[ Parent
| on HN ]
Re:On the impossibility of composing finalizers and FFI
by ng55QPSK on Tuesday February 27, 2024 @01:15AM
(#39520703)
which means: you tell the compiler
Re:On the impossibility of composing finalizers and FFI
by adgjlsfhk1 on Tuesday February 27, 2024 @08:34AM
(#39523870)
but as long as you are telling the compiler through a first class API, it's not brittle because there compiler knows the meaning and intent of the statement, and therefore can avoid optimizing it in invalid ways.