Signals and Threads cover image

Language design with Leo White

Signals and Threads

CHAPTER

How to Write a Program That Writes a Programmable Programmable Program

I think about this a lot in terms of making the abstraction free. Let's say I have some problem and I want to write some code that does something. And one way to implement my solution in code is to have a function that like reads that data and executes it. That's a nice way to write code, but it has a cost. You kind of reading and following the instructions live at runtime. It's actually you're spending computation on that. If you replace that with something that's staged, something that's kind of based on macros, you do that reading at compile time and just generate the kind of expanded version of the code.And so, you know, the performance improves

00:00
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner