Demo: Implicit Context

Channel:Jonathan Blow · Length:1:01:40 · Published:2015-05-21 · Views:28017

Watch on YouTube

Summary

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 HN recommends it

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, 2022

Programming language design · Compilers, interpreters & program analysis

Subtitles (excerpt)

okay hello everybody hopefully those of you who are interested in doing so have downloaded the sources that will'll go through from this fine uniform resource locator uh we're going to be in this demo file most of the time and we'll be visiting some of the other files all right as always our demo consists of a number of things that will uncomment and visit in sequence and I'm going to start today by talking about allocators because that's something that kind of bothered me that I didn't know the answer to like how was I going to do a good job about letting you control allocation and this is a problem that is generally not taken seriously especially by modern languages like a lot of languages are garbage collected right they don't want you to care about allocation at all but if you're writing Hy performance programs or programs that are close to the metal you really care about allocation a lot so even supposed new system languages like go are you know have garbage collection um D doesn't have mandatory garbage collection but the language sort of expects you to use it and a lot of its features are defined that way and in fact there are things in the language that by default like allocate things on a global Heap as well um

On Hacker News

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] — nmilo, 2025-12
> per-frame "scratch" pool allocator Here's that Jonathan Blow stream if anyone else is curious: [VIDEO] — rudedogg, 2022-11
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. — cyber_kinetist, 2022-09

Related videos