THE mayor of New York City, Bill de Blasio, campaigned on a promise to provide free universal pre-K classes to more than 70,000 4-year-olds. The city is now poised to meet this ambitious goal.

“This is a proud moment for us all,” Mr. de Blasio said earlier this week. “ ‘Pre-K for All’ is the centerpiece of our agenda to confront inequality in our city.”

Mr. de Blasio is right to be proud, but more must be done to ensure that pre-K classrooms deliver the results the mayor wants. Unfortunately, in cobbling together different funding sources and different types of preschools, the city has unintentionally reinforced barriers that keep rich and poor children apart, even in economically mixed neighborhoods.

Economic segregation is a problem in preschool classrooms across the country. Decades of research show that poor children do much better academically in economically mixed classes than they do if they attend school only with other poor children. Research also shows that well-off children are not harmed academically by going to school with poor children.