The most exciting part of Programming Languages (PL) research for me has always been in Programming Language Design.
By carefully crafting a language with a syntax and semantics tailored for a specific domain, PL designers can provide an interface for end users that seamlessly aligns with the sensibilities and intuitions of practitioners, allowing users to focus on the "interesting" parts of a problem and tackle larger and more complex problems.
Instead of writing a verbose sequence of API calls to display a dialog to a user in a video game:
# example code for a VN character.draw ( "alice" , character.LEFT, 0.1 ) character.draw ( "bob" , character.RIGHT, 0.1 ) character.say ( "alice" , "hello there!" ) character.say ( "bob" , "hi!" ) character.state ( "alice" , "sad" ) character.say ( "alice" , "did you hear the news?" )
A DSL instead allows designers to focus on the high-level of what the conversation should be:
# example DSL for dialog [ alice @ left in 0.1, bob @right in 0.1 ] alice: hello there! bob: hi! alice [ sad ] : did you hear the news?...
By encoding the "common sense rules" of a domain into the language itself, we can make writing incorrect programs impossible, and eliminate cognitive load and minimise the surface area for bugs and exploits.
A DSL for every domain. When you have eliminated all that is incorrect, then whatever remain, however complex, esoteric or convoluted, simply must be correct.
This has been a fun, exciting and impactful thread of research for the past several decades, but it would be remiss of me at this point to not mention the "e-LLM-ephant" in the room. It has only been a few years, and LLMs and LLM-generated code has already permeated widely across the software ecosystem and continuously forces developers to reevaluate their preconceptions of what is and isn't possible for a machine to generate. Namely, this also includes problems that we might previously have sought to tackle with language design (eliminating boilerplate, capturing conventions or common sense etc.).
This emerging landscape holds a lot of potential, and there are many interesting questions in asking how LLMs can contribute to software development, but as I watch, I am also noticing a worrying trend of LLM developments supplanting advances and interest in the design of DSLs: why craft a DSL that eliminates all boilerplate when an LLM can generate whatever code you need?
Is there a future for Language Design in this new era of LLMs? The point of this blog post is to present some thoughts I've been thinking about in this emerging space, prompt for discussion, and outline some potential ways forward language design can co-exist and collaborate with the advances in LLMs.