
Demo: Implicit Context
About this video
Jonathan Blow gives a formal, hour-long demo of his Jai compiler focused on the implicit context feature. The context carries things like allocators through a program without explicit parameter passing, and the talk walks through the code.
Why it appears in the archive
Cited in discussions of memory arenas and allocators as the origin of the implicit context idea that later appeared in Odin and other languages.
AI-generated summary and labels from the source dataset; verify important details against the video. Source & credits.
From the Hacker News discussion
Implicit context [1] was one of the coolest features of a programming language I’ve ever seen that no one has ever implemented. And I’m really not sure why. Not just Go but most languages have this context passing problem with varying degrees of solution quality, making this implicit and built in could have opened up so many possibilities, more than just arenas. [1]: [VIDEO]
Read original comment ↗I remember first seeing this idea from Jai ( [VIDEO] ), and I'm happy it's landing in other languages. Zig went another direction and requires you to specify the allocator explicitly via a function parameter, which is understandable given the language's goal to make everything explicit.
Read original comment ↗> per-frame "scratch" pool allocator Here's that Jonathan Blow stream if anyone else is curious: [VIDEO]
Read original comment ↗