Converted Gasometer B in Vienna, Austria. Photo: Schutze-Rodemann/Bildarchiv-Monheim/Schutze-Rodemann/Bildarchiv-Monheim

Among Mayor de Blasio’s specific vows, one figure stands out: 200,000. That’s the number of affordable apartments he wants to provide over the next decade. Well, not provide, exactly: De Blasio, like his predecessor, is taking cover behind the weaselly phrase “build or preserve,” meaning that only about half that number would be added to the city’s stock. Even so, builders would still have to grind out nearly 9,000 new affordable apartments a year to meet the target — in addition to untold unaffordable ones. Those numbers conjure visions of flimsy and identical high-rises stretching, Seoul-style, from the East River to the Atlantic Ocean. And even that’s probably not enough to keep the city’s housing costs from spiraling even farther into fantasyland, or to shelter the needy, or to compensate for the speed with which regulated apartments get sucked into the open market.

But New York doesn’t need to give up on decent architecture in its rush to social justice — in fact, the two are intertwined. We already have a huge stock of cloned apartments stacked in X-shaped towers, bought with public money then left to rot. What we need now is a flurry of interventions, varied, scattered, and flexile, uniform only in their excellence. Small insertions wedged mid-block, mid-rise apartment buildings with street-level stores, supportive housing for the formerly homeless, a mixed-use megacomplex or two — these are the vessels in which luxury and affordability can amicably coexist.

Good architects know how to build cheaply, well, and inventively — how to make residences adapt to their residents, instead of the other way around. In New York, though, they are trapped in a pathological system. The city combines a high-risk, high-yield market with cumbersome bureaucracy. We spend a fortune on affordable housing: The price tag for meeting Mayor Bloomberg’s promise to “build or preserve” 165,000 units was $8.3 billion in public funds. But construction costs are high and rising (the target for subsidized affordable housing is $215 per square foot) and the price of land is astronomical. Gone are the days when the city was turning over entire burned-out blocks and derelict swaths to private builders. Now, nonprofit developers have to hunt for precious sites the way hounds sniff for truffles. Often they make do with sloped, undersized, or oddly shaped lots, which further drive up the cost of building. The process is also agonizingly—and therefore expensively—slow. NIMBY lawsuits, a byzantine financing system, a convoluted public review process—all of it drives many developers to offset delays by maximizing returns in the luxury market.

Bloomberg’s approach was to nudge large developers to build as many apartments as they could, make them as expensive as they liked, and set aside some square footage for those with limited income. De Blasio has promised to extract a slightly bigger slice of the pie for affordable housing. But if he really wants to make a difference, he’ll have to develop alternatives to the old mechanism, in which the city pays developers to make a healthy profit on fabulously expensive real estate, in exchange for a few sanely priced apartments. The mayor might start by sending a fact-finding team to Vienna.

Like many of the wealthiest European countries—Switzerland, Denmark, the Netherlands— Vienna treats housing as a social good, rather than a byproduct of real-estate investments. That means not just building plenty, but building well. The city’s government drives the vast majority of all new apartment construction, and more than 60 percent of the population—teachers, cops, janitors, doctors, and new immigrants—live in subsidized housing. You’d never know it just by looking around: neighborhoods are peppered with generous, well-built, and subsidized apartment buildings that enrich city’s character, rather than clamoring to be ignored.

Vienna is not alone. Enlightened cities everywhere long ago found ways to tackle a problem that only seems intractable: how to build new housing that doesn’t empty the bank account or crush the soul.

City: Vienna

Project: Gasometer B (2001)

Designed by: Coop Himmelb(l)au

The city recycled a quartet of industrial behemoths by dividing them up among architects and demanding a mix of offices, apartments, stores, and common spaces. Coop Himmelb(l)au inserted a new cylinder inside one of the original brick shells, and added a new glass chip outside, combining 21stcentury weightlessness with industrial-age brawn.

Converted Gasometer B, Vienna. Photo: Schutze-Rodemann/Bildarchiv-Monheim/Schutze-Rodemann/Bildarchiv-Monheim

City: Vienna

Project: Bike City (2008)

Designed by: Königlarch Architekten

Although Austrian law requires one garage space for each new apartment, this complex obtained a dispensation to reduce parking by half and devoting the resulting square footage to bike storage and common spaces.

Bike City, Vienna. Photo: Wohnfonds Wien/Stephan Huger

City: Singapore

Project: SkyTerrace@Dawson (2014)

Designed by: SCDA Architects

With limited land, high density, and a housing market largely controlled by the government, Singapore encourages mega high-rise projects. This one, built out of prefabricated modules, pairs large family apartments with smaller “granny flats,” recreating the multigenerational village in a vertical space. Projects like these can feel isolated from each other, but within the complex, landscaped bridges encourage high-altitude wandering and elevator-free visits.

Photo: SCDA Architects

City: Singapore

Project: The Interlace (2009)

Designed by: Ole Scheeren Büro

To avoid the deadening effect of parallel towers, the architect piled horizontal slabs like pick-up-sticks, to bring apartments closer to each other and mix greenery onto every level.

The Interlace, Singapore. Photo: Ole Scheeren ? OMA

City: San Francisco

Project: Richardson Apartments (2011)

Designed by: David Baker

The five-story corner supportive housing facility integrates once-homeless residents into the neighborhood, not by retreating behind bland brickwork, but by asserting itself on the streetscape. Stores on the street, courtyards within, warm lighting, and varied massing blur the line between safety net and gentrification.

Richardson Housing, San Francisco. Photo: Bruce Damonte/Courtesy of David Baker Architects

City: Paris

Project: rue Louis Blanc Social Housing (2006)

Designed by: ECDM

Afflicted with scarce resources and abundant regulation, non-profit developers often wind up with small and awkward lots. That’s where the designer’s skill matters most. On a tiny sliver of land, the architects have created a quietly elegant building with a hazy white facade that both honors and stands out from its immediate surroundings.

Afflicted with scarce resources and abundant regulation, non-profit developers often wind up with small and awkward lots. That’s where the designer’s skill matters most. On a tiny sliver of land, the architects have created a quietly elegant building with a hazy white facade that both honors and stands out from its immediate surroundings.

rue Louis Blanc Social Housing, Paris. Photo: ECDM architectes

City: Madrid

Project: Carabanchel (2008)

Designed by: Foreign Office

Some designers fight the homogenizing tendencies of low-income housing by painting it wild colors; here, the architects let the residents give the façade its fluid variety by wrapping the building in bamboo shutters that can be opened or closed, a living screen against the hard Castilian sun.