Recent stories
Each story's summary, with the places it was discussed.
Summaries are written by AI from the linked sources. Open the source for full context.
The author examines Nova JavaScript engine’s unique approach to garbage collection using Rust’s borrow checker.
Historically, the engine relied on covariant handles, leading to cumbersome code filled with manual binding and unbinding calls to satisfy the borrow checker. Recent insights revealed that garbage-collected handles are inherently contravariant rather than covariant. By embracing contravariance—treating handles as 'sinks'—the author proposes a model where local lifetimes can be safely stored in longer-lived heap structures. This shifts the complexity from the user to the engine's internal architecture, promising significant ergonomics improvements by removing near 800 repetitive manual calls. The author suggests that contravariant references might unlocked new possibilities for managing self-referential data structures in systems programming.