2min chapter

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

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode