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 Hacker News points people here: Cited in discussions of memory arenas and allocators as the origin of the implicit context idea that later appeared in Odin and other languages.
“Here's that Jonathan Blow stream if anyone else is curious”HN comment, 2022
“was one of the coolest features of a programming language”
Implicit context solves context-passing across languages.
Full comment
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]: this video
Cites itcyber_kinetistSep 2022
“I remember first seeing this idea from Jai”
Jai's implicit context idea.
Full comment
I remember first seeing this idea from Jai ( this 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.
Cites itrudedoggNov 2022
“Here's that Jonathan Blow stream if anyone else is curious”
Jonathan Blow stream on scratch allocators.
Full comment
> per-frame "scratch" pool allocator Here's that Jonathan Blow stream if anyone else is curious: this video