The new take on Roald Dahl’s Willy Wonka is unabashedly an old-fashioned musical, devoid of cynicism, and unfailingly optimistic. Timothée Chalamet headlines Wonka, in theaters Friday, with magic, whimsy, and—surprisingly, given the present political mood—a healthy enthusiasm for capitalism.

The film is a prequel to the 1971 classic starring Gene Wilder as an older (and more menacing) version of Willy Wonka. (Johnny Depp also took up the role in 2005, but Wonka’s Oompa Loompa design alone makes clear that this is not part of that story.) Chalamet’s Willy has just sailed the world collecting recipes and ingredients and arrives in the big city with—as he sings—a hatful of dreams. Those dreams involve chocolate and magic, the more chocolate and magic the better.

The action takes place against a vaguely Elizabethan backdrop. There are urchins, scoundrels, sailors, and plenty of ratty top hats. When Willy runs afoul of a particularly odious couple (the always fantastic Olivia Colman and funny Tom Davis), he finds himself trapped in a workhouse rivaling that of Oliver Twist. He knows his way out is chocolate—if only he can overcome the dastardly plot of the chocolate cartel that runs the town.

Along the way, Willy takes his friends on flights of fancy that are the true heart of the film. Who cares about drudgery when you can ride a bundle of balloons above the city or befriend a giraffe in the zoo? These musical set pieces make Wonka a delight.

The supporting cast is delicious, too, including Hugh Grant’s turn as an Oompa Loompa, Keegan-Michael Key as a corpulently corrupt police officer, and Rowan Atkinson as a hilariously chocolate-addled priest. Along with a host of monks, the priest is a villain—but in a silly way. He’s one of many corrupt figures in the city, yet the writing doesn’t attribute corruption to his faith. This handling of Christianity is characteristically negative, but only incidentally so, and Atkinson (a skilled slapstick actor of Mr. Bean fame) may be the funniest part of the movie.

That silliness is part of a broader tone of optimism that makes Wonka refreshing. Willy’s dream is to sell chocolate to the masses. The film doesn’t shame him for wanting to make money and a living for his workers. The bad guys are corporate goons, to be sure, but the source of their villainy is not business itself. Willy is eager to compete in the marketplace, and the story never questions whether his work is benevolent, providing joy alongside a profit. Where 1971’s Willy Wonka and the Chocolate Factory was a meditation on greed and its dangers, Wonka captures the beauty of hard work and entrepreneurship.

That turn is surprising not only because of the older film’s message. It’s also unexpected given the present dissatisfaction with the free market, expressed in talk of “late capitalism” on the Left and protectionist policies on the Right. Titans of industry are not our uncomplicated cultural heroes. Increasingly, the assumption is that capitalism has failed and that building a large company is at best a self-serving necessity or at worst an evil.

Wonka goes back to market basics: Create something, believe in it, work toward it, and the company you build will bless not only you but your whole community. Willy’s work is a labor of love, and while cynicism whispers that business is never that simple, Wonka successfully makes founding a company look aspirational.

Of course, Willy’s diligence is helped along by magic, though not as much as there could be in a kids’ flick. Magic is the shorthand explanation for many of Willy’s inventions, but fundamentally Willy’s work is his vision—his imagination. It’s a vision we know is ultimately successful, building the fantastic factory of Wilder’s iconic Wonka (even if it’s not clear how the character himself would evolve from Chalamet’s version to Wilder’s take).

Magical assistance aside, Wonka models kindness without reserve and teaches persistence in the face of difficulties. It feels like a throwback to children’s musicals of the 1960s and ’70s: giddy, innocent of sexual content, and never more offensive than a few mildly crude jokes. It’s a spectacle of sugar, a confection for families, and a sweet antidote to our cynical times.

Rebecca Cusey is a lawyer and movie critic in Washington, DC.