Writer-director Bo Burnham on the set of his independent film “Eighth Grade” with the star, Elsie Fisher. (Linda Kallerus/Courtesy A24)

The principal of my daughters’ middle school once asked a large group of parents who would go back to redo elementary school if given the chance. Some hands went up. The same question was asked about high school. Again, a scattering of hands. When she asked if anyone would return to middle school, nobody bit.

And why would they? The middle school years — when children are becoming teenagers with the requisite emotional and physical changes — are notoriously difficult, and that hasn’t changed much, even if the world around it has.

That’s why writer-director Bo Burnham’s spot-on portrayal of middle school in his acclaimed independent film “Eighth Grade” has the effect of a horror flick without being labeled one. (Out of 173 reviews on the entertainment website Rotten Tomatoes, only three are negative, giving it an unusually high 98 percent rating.)

(It’s just too bad that eighth-graders can’t go see it at will, because with an “R” rating, kids under 17 need an adult to go with them. Yet another example of the silliness of the American movie rating system.)

Burnham, who is about to turn 28, guides Elsie Fisher, the 13-year-old star of the film, through a series of cringe-inducing scenes that speak to the anxiety plaguing many middle-schoolers. But the film also depicts the defining characteristics of our times (obsession with technology, loneliness, etc.). And that’s what Burnham says he was going for: The movie is intended to be a statement on American culture, which is “going through a pubescent stage” (which you may think is a nice way of putting it).

Fisher’s character, Kayla, is a seemingly friendless girl desperate to fit in at school and struggling to distance herself from her father — just like a lot of 13-year-olds. Burnham casts in stark relief a fundamental contradiction in this technological age: New gadgets have seemingly made human contact easier, but in many cases they do nothing to bring people closer. In one scene, Kayla tries to talk to two “cool” girls who keep looking down at their phones. Other scenes show Kayla making how-to-have-a-life videos for an audience she isn’t sure exists, recommending that viewers attempt to do things she can’t or has a difficult time doing.

“We’re all feeling really anxious, really strange,” he said. “It just seems like a strange, surreal time to be alive. The most surreal time in our school years is eighth grade. And the most surreal time in our lives is 2018.”

It isn’t just eighth-graders who can relate to the desire to connect with others and have their voices heard in the crowded public square amid the cacophony of indifference and downright meanness. There are also scenes that remind us how much harder it is for kids today, including one that refers to an active shooter drill, something that did not exist when Burnham was in eighth grade.

Burnham was an eighth-grader at Miles River Middle School in Hamilton, Mass. — and, perhaps surprisingly, he is one of the few people I’ve ever had say they actually liked middle school.

“For me as an eighth-grade boy, my anxiety hadn’t woken up that year,” he said. “That happened to me as a sophomore in high school.”

He attended a boys Catholic high school (didn’t much like history but loved science and math) and worked hard, getting himself admitted to New York University. But he told his parents he wanted to take a gap year: Comedy videos he made for his family had gone viral on social media, and he wanted to see if he could make it a career.

They approved, and it worked. He has done comedy via albums, live shows and taped specials for his YouTube channel and Netflix. He has worked on several television series, published a book of poetry and acted in several movies, including 2017’s “The Big Sick.”

“Eighth Grade” is the first major film he has written and directed, and he did it without the backing of a major film studio. The movie wasn’t made for eighth-graders, he said, and had a different title — “The Coolest Girl in the World” — throughout production. But the title it opened with just seemed to fit in the end.

With some sexual content — the star considers winning the heart of a boy she has a crush on by sending him nude pictures, and there is a banana scene — the movie has an “R” rating. But Burnham said kids know far more than they are given credit for.

“I’ve always tried to make things for young people with the assumption that they are smarter than you think they are, and they can handle more things than you think they can and they are more self-aware than you think they are, and you can present it as truthful as you can,” he said.

A24, the production company behind “Eighth Grade,” held free screenings earlier this month to give kids a chance to see it.  Burnham and Fisher can be seen in a YouTube video — which you can see here — as they react to kids talking about the film. One girl says: “I’m going into eighth grade and this is kind of stressing me out,” while others talk about how authentic it is (though one boy says it portrays his life in sixth grade, which given some of the content, is somewhat scary).

The movie raises the never adequately answered question about what schools should do with middle school-age kids. Put them in K-8 schools? Their own middle schools? Should eighth grade be part of high school? You can find a number of experiments in American schools — and still, with all the experimentation, there isn’t a definitive answer.

That speaks to what child development expert Chip Wood wrote in his seminal book on youngsters at different stages of their lives, titled “Yardsticks: Children in the Classroom Ages 4-14″

Twelves (and thirteens and fourteens for that matter) probably do not belong in formal school environments at all, but in some kind of cross between summer camp and the Civilian Conservation Corps camps of the Great Depression — plenty of physical activity, structured groups and time with peers, with a little formal education thrown in. Of course this will never happen, so success in the school world for children from twelve to fourteen depends on the flexibility of teachers and administrators in creating environments and curriculums that can respond to the developmental chaos of these early adolescent years.

Elsie Fisher as Kayla in Bo Burnham’s film “Eighth Grade.” (Josh Ethan Johnson/Courtesy A24)