Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
adgjlsfhk1
· 2y ago · 0 comments
Julia solves this pretty well by having a gc_preserve macro that tells the compiler that an object has hidden references within the scope.
Comments
[–]
ng55QPSK
2y ago
which means: you tell the compiler
[–]
adgjlsfhk1
OP
2y ago
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.