
The Greatest Pun: JavaScript's ${{ }} Tagged Template Literal
Software engineer Nishant Shukla argues in a new essay that ${{ }}, a construct hidden inside JavaScript's tagged template literals, is the greatest pun he has ever found. The pun, he says, lives in code, not in English.
Software engineer and author Nishant Shukla published an essay on September 26, 2026, arguing that the ${{ }} construct hidden inside JavaScript's tagged template literals is the greatest pun he has ever discovered. The pun, he says, is not in English — it lives in code.
One string, two parses
Shukla opens with Shakespeare. In "Twelfth Night", the line "Better a witty fool than a foolish wit" turns the noun "fool" into the adjective "foolish" and the adjective "witty" into the noun "wit". Such puns lean on the rules of grammar; others lean on context. In "Othello", "Put out the light, and then put out the light" first means to extinguish a candle, then becomes a metaphor for killing Desdemona.
The Oxford English Dictionary defines a pun through its humorous effect. Shukla notes that humor is subjective, but points out that natural languages and programming languages share one property: grammar. That is the ground his favorite pun stands on.
Tagged template literals
JavaScript has a feature called the tagged template literal, which lets a tag function process a template. In Shukla's example, a tag called dedent strips excessive indentation from a system prompt. A tag function receives the literal's text pieces and the evaluated ${...} values as separate arguments, so it can do whatever it likes with each one.
Where ${{ }} comes from
Most templating languages let you write a template in the same medium as the final product: text with holes where the variables go. The {{ }} syntax is shared by Mustache, Handlebars, Jinja2, Django templates, Liquid, Angular templates and Vue templates.
Shukla defines a tag function called prompt whose calls look like they accept {{ }} templates: ${{ url }}, ${{ notes }}, ${{ time }}. The apparent template syntax emerges by coincidence: ${...} evaluates whatever is inside the braces, and { url } is JavaScript's object shorthand for { url: url }. So one string carries two readings — readers see {{ url }}, while the engine sees an object. "JavaScript sees one thing, and you see another. The {{ url }} syntax lives in your head," Shukla writes.
From an internal trick to an SDK
The prompt tag produces a string that the observability tool Helicone processes to analyze prompts. Shukla says he had used the idea internally in 2024, and that Justin from Helicone later made it official in the SDK. He admits he may have overplayed the pun, but says he is proud of it.
He ties the joke to two of his own essays: in "Grammar models are back, baby!" he treats a pun as one string with two parses and hands back a probability distribution over them, and in "Spatial languages" he gives the parser a second dimension.
SiTech — AI-powered web development
We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.