‘Nobody ever got shot or knocked up in an online school.” That’s the comment offered by a friend when my daughter — in search of more AP classes than her public school offered, and anxious to graduate early — decided to switch to an online high school. It has come back to me in the wake of the Sandy Hook school shooting.

It would, of course, be absurd to suggest that we abandon traditional public schools for online ones simply as a precaution against mass shootings. Mass shootings are extremely rare events, and only a fool would make a drastic policy shift with that in mind.

But the larger question of whether it makes sense to warehouse a bunch of kids together, sorted by age, remains. Is it time to rethink traditional public schools?

Many think so. As The New York Times recently noted, parents are pulling their kids out of many large urban districts in favor of private, on-line and charter schools. This is causing financial problems as the lower enrollments lead to teacher layoffs and general shrinkage.

Why are the parents pulling their kids? Because they think the public schools aren’t as good as the alternatives.

As the public schools’ performance stays basically flat despite vastly increased budgets, the alternatives are looking better.

Public schools are, at best, standing still. Alternatives to public schools are expanding by leaps and bounds.

A few decades ago, the alternatives to public schools weren’t so alternative. You could go to a private religious school (probably Catholic) where discipline would be stricter, and the academics more rigorous, or you could go to a nonreligious private school that tried to be more elite than the public schools. Either way, the students would still be sitting in rows, listening to the same lectures and reading the same textbooks, sorted by age and advancing by grade.

This Industrial Era approach (public schools were organized in the 19th century on a Prussian model, explicitly to produce obedient, orderly workers) had advantages. But it also had disadvantages. Like interchangeable parts in an industrial machine, students were treated alike, regardless of their individual characteristics and needs. Square peg, meet round hole.

Putting kids together and sorting by age also created that dysfunctional creature, the “teenager.” Once, teen-agers weren’t so much a demographic as adults-in-training. They worked, did farm chores, watched children and generally functioned in the real world. They got status and recognition for doing these things well, and they got shame and disapproval for doing them badly.

But once they were segregated by age in public schools, teens looked to their peers for status and recognition instead of to society at large. As Thomas Hine writes in The American Heritage, “Young people became teenagersbecause we had nothing better for them to do. We began seeing them not as productive but as gullible consumers.”

Again, we may have had no alternative in the 19th century. But now many alternatives are appearing:

* The approach followed by the Khan Academy, where students view lectures on video at home, then do “homework” in the classroom where teachers are available to help.

* Online schools, where kids learn at their own pace, and have time to work jobs or internships during the day — that’s what my daughter did, and she learned a lot from her time in the workplace.

* Homeschooling, which is increasingly popular and — as any National Spelling Bee fan knows — often quite successful.

* And a variety of other approaches being experimented with by what Anya Kamenetz, in her book “DIY U,” calls the “edupunks”: So-called “unschooling,” where students learn via life experience, or the substitution of performance-based credentials or portfolios for diplomas based largely on time spent in class.

* We’re also seeing the rise of dual enrollment, where high school overlaps with college.

Personally, I think that the more we get kids out in the real world, and the less we keep them segregated from reality, the more they’ll learn and the better they’ll do.

Regardless, change is coming in the K-12 world. It’s a knowledge industry, after all — and how many knowledge industries are the same in the 21st century as they were in the 19th?

Glenn Harlan Reynolds is a law professor at the University of Tennessee. His “The K-12 Implosion” will be published by Encounter Books next month.