Warner Bros. / IMDB

The lesson you learn right away, when you are a small child who has devoured a heap of Roald Dahl books, is that childhood is dark and dangerous—and yet still an adventure worth taking. In Dahl’s simultaneously sinister and gloriumptious worlds, to use one of his many invented adjectives, breaking the rules can yield both great rewards and terrible punishment.

Navigating this not-always-straightforward relationship between what people deserve and what they get is part of growing up. It’s also a central theme in one of Dahl’s most beloved books, Charlie and the Chocolate Factory, and an idea explored thoroughly by Willy Wonka, the quirky candy maker at the center of the story.

Gene Wilder, in his outstanding portrayal of Wonka in the 1971 adaptation of Dahl’s 1964 tale, captures this theme by oscillating between sincerity and deadpan sarcasm with unnerving grace. Wilder, who died Monday morning at age 83, was so well suited for the role that his Wonka seems to have sprung to the silver screen directly from Dahl’s mind. (It’s somewhat disorienting, then, to return to Dahl’s physical description of Wonka as a little man with a black goatee and quick squirrel-like movements—none of which is evident in Wilder’s portrayal—though Wilder exactly fits Dahl’s version of a Wonka with blue eyes “marvelously bright... sparkling and twinkling at the same time.”)

Margaret Talbot, writing for the New Yorker, once described Dahl’s writing as not simply indulgent but nourishing to a child’s imagination. “[His] best stories do what G. K. Chesterton, in his essay ‘The Ethic of Elfland,’ said that fairy tales did: inspire in children a sense that life ‘is not only a pleasure but an eccentric privilege,’” she wrote in 2005. “Dahl’s purse-lipped critics fail to recognize that his stories don’t merely indulge a child’s fantasies—they replenish them.”

Wilder’s performance as Wonka, which remains captivating no matter how many times you experience it, is just the same.

Upon hearing the news of Wilder’s death, the image that immediately materialized for me was that of the actor’s memorable somersault entrance in Willy Wonka & the Chocolate Factory. Wilder says the scene as it appears was his idea, and the “main motor” to his character development. In it, he limps slowly down a pathway leading from the door of Wonka’s candy factory before pitching forward in an mock fall-turned-somersault, finally leaping up with his arms outstretched. “I said, ‘I’d like to come out with a cane and be crippled,” he explained in the 2001 documentary Pure Imagination, “because no one will know, from that time on, whether I’m lying or telling the truth.’”

Gene Wilder as Willy Wonka in his first scene of the 1971 film, "Willy Wonka & the Chocolate Factory."
Warner Bros. / IMDB

“He didn’t even have to open his mouth,” Mel Stuart, the director, remembers of the casting process in the documentary. “I said, ‘He’s got the part.’” Stuart deserves credit for casting Wilder, but in retrospect Wilder seems destined to have played the part.

To say Wilder steals the show is an understatement. His performance is the reason for the film’s cult status. (It only makes sense that the name of the film, Willy Wonka & the Chocolate Factory, focuses on Wilder’s character rather than the book’s protagonist, Charlie Bucket—though Dahl apparently disliked the adaptation for this reason.) Wilder’s depiction of Wonka—detached, charming, mildly sadistic—also helps illuminate a theme that’s somewhat dormant in the book: the inexorable march of progress in a technological age, with Wonka as a reluctant champion of this force.

While Dahl’s novel has a largely Victorian feel, the 1971 film brings Wonka into the dawn of the computer age. Beginning with the candy-factory footage overlaid by the opening credits, Willy Wonka & the Chocolate Factory is in many ways a story about the collision between people and technology. In one delightful scene, a computer scientist enlists the help of a room-sized Siemens System 4004—based on an actual processor—to determine the location of a highly sought-after golden ticket required to gain entry to Wonka’s factory. “We’re about to witness miracle of the machine age,” the man says. “Based on the revolutionary computational law of probability, this machine will tell us the precise location of the three remaining golden tickets!” (In exaggerated fashion, it doesn’t.)

Warner Bros. / IMDB

Many a thesis has been written about how Dahl’s story is fundamentally about capitalism and labor exploitation, and how Wonka is a master-colonizer of the oppressed Oompa Loompa laborers. These themes become more poignant, given that the author’s first descriptions of the Oompa Loompas, in his original text, were of African Pygmy people, rather than the green-haired, orange-faced beings seen in the film. (Wonka’s not the only capitalist magnate exploiting his workers. At Veruca Salt’s father’s peanut factory, workers are seen in the film shelling chocolate bars under twin signs that say, “Willing Hands Make Happy Hearts” and “Busy Hands Make Profits.”) It’s not that Dahl was critiquing Wonka, critics argue, but rather glorifying the British Empire and its colonialist history.

Now, 45 years after the film’s release, there’s something eerily contemporary about the way Wonka’s message resonates with trends in 21st-century globalization and modern tech culture. (Remember, for instance, that the Oompa Loompas toil in Wonka’s factory because he specifically seeks foreign labor after firing his entire workforce.) Viewing the film this way, the ominous words Wonka recites on a kaleidoscopic boat ride might be read as commentary on the inevitability of technological progress, and the moral ambiguity that accompanies it (most but not all of these verses were brought to the film directly from the book):

There's no earthly way of knowing
Which direction we are going!
There's no knowing where we're rowing,
Or which way the river's flowing!
Is it raining; is it snowing?
Is a hurricane a-blowing?
Not a speck of light is showing,
So the danger must be growing
Are the fires of Hell a-glowing?
Is the grisly Reaper mowing?
Yes!
The danger must be growing,
For the rowers keep on rowing!
And they're certainly not showing
Any signs that they are slowing!

Or, as Wonka puts it earlier in the factory tour: “You can’t get out backwards, you gotta go forwards to go back. Better press on.”

Wonka’s entire operation resides somewhere in the realm between gadgetry, chaos, and magic—“little surprises around every corner but nothing dangerous,” Wonka says. There are coatracks shaped like human hands that snatch the hat off Grandpa Joe’s head. There is a door protected by a musical passcode; Wonka plays a tiny keyboard to open it. (It seems fitting, against this backdrop, that upgrades to Willy Wonka’s cultural legacy have been in many ways tech-centric: like the internet’s embrace of the Condescending Wonka meme, or the time Nestlé, in a 2012 contest, hid GPS trackers rather than golden tickets behind the packaging of Kit Kat bars.)

Warner Bros. / IMDB

Wonka’s insistence on mixing work and fun is, to a viewer in 2016, more Silicon Valley than Industrial Revolution. Consider the tagline printed on the movie’s original poster: “It’s everybody’s non-pollutionary, anti-institutionary, pro-confectionery factory of fun!” The message in tech today—that a combination of entrepreneurial spirit, whimsy, and lofty ideals begets great financial success—is everywhere in Wonka’s world. Meaningful innovation is something you can simply summon by sheer force of will. “Anything you want to, do it,” he sings. “Want to change the world? There’s nothing to it.”

Warner Bros. / IMDB

It’s notable, too, that one beloved quote from the film—often shared as inspirational in nature—is actually delivered by Wilder as a reprimand to one of the children who questions Wonka’s invention of snozzberry-flavored wallpaper: “We are the music makers, and we are the dreamers of the dreams,” he says, while pinching Veruca Salt’s chin between his thumb and forefinger.
(The line is still lovely, however, in the context of Arthur O’Shaughnessy’s original 1873 poem. This and many more of Wonka’s most memorable one-liners in the film are lifted from literature.)

Along with lick-able walls and Everlasting Gobstoppers, Wonka’s high-tech factory houses candy-making machines galore—including a dense network of tubes and chutes, fizzy drinks that make you fly, and a teleportation-like system that can broadcast chocolate bars across airwaves. The paradox: All this tech is what makes Wonka Wonka, and it’s also what dooms each of his visitors. (The moral of the story, clearly, is that the bratty kids doom themselves; but it’s impossible to ignore the role technology plays in their respective undoings.)

The great glass elevator, Wonka’s most impressive piece of technology, helpfully underscores the larger contradiction: It is a vessel that both serves as the best way to move within the factory; and is ultimately the thing that ejects him from it once and for all. The central tension of Wonka’s character—the same thing Wilder described as a nagging question of whether Wonka was lying or telling the truth—is wrapped up in this same paradox, and delivered again and again by Wilder in blistering, irresistible deadpan. “What is this, Wonka, some kind of funhouse?” an agitated Mr. Salt demands at one point.

“Why?” Wonka replies. “Having fun?”

In the book, various characters describe Wonka’s eccentricities this way: “He’s balmy! He’s nutty! He’s screwy! He’s batty! He’s dippy! He’s dotty! He’s daffy! He’s goofy! He’s beany! He’s buggy! He’s wacky! He’s loony!” An exchange in the film is slightly more restrained, but carries the same underlying message. “He’s absolutely bonkers!” declares Veruca Salt. Charlie Bucket’s response: “That’s not bad.”

Despite the story’s darkly happy ending, and despite Wilder’s spellbinding performance, it’s not entirely clear whether Charlie is right.

Wilder captured the full spectrum of Wonka’s oddities so well, and with such finesse, that Wonka seems to have remained a part of him ever since. (Certainly, any fan of the film will admit, you can’t see Wilder without thinking of Wonka.) In Pure Imagination, Wilder recounts the story of being in the supermarket with his mother, and her quiet delight in telling some nearby children that they were in the presence of the great candy-maker himself. Even then, he said, after all those years, the role continued to warm his heart. “It is a great legacy.”

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.