Skip to content
0:00 / 0:00

#macros#racket#scheme

Macros Matter: infrastructure for building new programming languages

Northwestern University

30K subscribers • 1 video on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Robby Findler, Associate Professor at Northwestern University

Intermediate. Assumes working knowledge.

7.9K views16 years ago2 recommendations

Programming languagesSystems programmingLanguage design and type systemsCompilers and interpretersFunctional programming

Robby Findler discusses how macro systems provide the infrastructure to build and extend programming languages while avoiding common syntax and scoping pitfalls.

Building new programming languages from whole cloth is a difficult proposition at best. Macro system provide an alternative; they support the construction of new programming languages from existing existing pieces, while still providing the flexibility to radically change the syntax and semantics of the programming language. In this talk, Robby Findler, associate professor of electrical engineering and computer science at Northwestern University, will give a high-level overview of the research area of macros, showing what can be accomplished with them and introducing some of the technical challenges they pose. ____ ▶️ Subscribe: bit.ly/NorthwesternUYTSubscribe Follow Northwestern on social media: -Instagram: instagram.com/northwesternu -TikTok: tiktok.com/@northwestern.u -Twitter/X: twitter.com/northwesternu -LinkedIn: linkedin.com/school/northwestern-university -Facebook: facebook.com/northwesternu Northwestern on the Web: -Northwestern Homepage: northwestern.edu -Northwestern Now News: news.northwestern.edu -Northwestern Magazine: magazine.northwestern.edu

Why it's here

2 people recommend this

What people say. Recommended for its insights into compile-time macro expansion and language-oriented programming.

Moments people linked to

u/MedeaMelanain r/programming • Recommends

On “Building new programming languages [VID]”

TL;DR: Lessons learned about compile-time macros: * Don't expand macros on source code (string) level; you will mess up your token structure. * Don't expand macros on the token level; you will run into problems on the AST level. * Don't expand macros on the AST level; you will run into scoping (variable bindings) issues. * (Some forms of) runtime laziness can be achieved using compile-time expansion. * Be careful of exponential explosion of expressions when composing macros that duplicate some input expression. * Don't write macros that duplicate input expressions whose evaluation has side-effects. In other words: the lecture tells about the key properties of a macro system that is refere…
6View on Reddit

u/shimeiin r/compsci • Recommends

On “Just got this email from my CS department. This is pretty much the coolest class description ever.”

> I also think a lot of those languages were designed for that reason Also, some people here are ignoring that you'd still want to have PL knowledge going forward because even if you never design your own standalone language you may want to be able to design your own domain-specific ones hosted in some other large language. See this talk on macros or this talk on documentation languages. The point is that with the right tools, you can build languages to help you solve problems rather than fighting against the limitations of some particular PL.