Still, Boston’s program created more affordable housing as construction was booming but most incomes were stagnant or declining. Boston requires developers to make 15% of units affordable or pay at least $200,000 per unit to finance such housing elsewhere in the city.

Barry Bluestone, director of Northeastern University’s Center for Urban and Regional Policy, said that while Boston’s inclusionary zoning has produced plenty of affordable housing, it hasn’t solved the city’s inequality issue—a scenario that may play out in New York if Mr. de Blasio is elected.

“I think it will lead to somewhat less [housing],” Mr. Bluestone said. “And I think that’s a problem, because both our cities are growing. We’re getting a lot of young people coming in.”