Donald Trump built his campaign on the promise to build a wall along the Mexican border. The idea is attention-grabbing (and unworkable). But the striking thing is that it’s not too far away from the current Republican orthodoxy.

Not long ago you could be a movement conservative and be for reasonably open immigration policies. Ronald Reagan, Jack Kemp, Steve Forbes and George W. Bush all took open positions on immigration.

But times have changed. Now you prove your conservative credentials by saying you want to deport undocumented aliens. Now you prove it by opposing higher immigration flows. Now Donald Trump brings Republican crowds to their feet by bashing the supposed criminal hordes sneaking up from Mexico.

The problem with this new orthodoxy is that it is completely obsolete. It’s based on a view of immigration that may have reflected 1980s realities, but that has little to do with reality today.

The number of immigrants flowing into the US illegally is dropping, not rising. The flow of total immigrants peaked in 2005 and has been dropping since. The share of immigrants coming from Latin America is falling sharply. Since 2008, more immigrants have come from Asia than Latin America, and the disparity is growing.

There are more Mexicans leaving the United States than coming in. According to the Pew Research Centre, there was a net outflow of 140,000 from 2009 to 2014. If Trump builds his wall, he’ll lock more Mexican immigrants in than he’ll keep out.

Trump plays up the alleged threat of crime committed by immigrants. But the overall evidence is clear. Immigrants make American streets safer. Roughly 1.6 per cent of immigrant males between ages 18 and 39 wind up incarcerated, compared with 3.3 per cent of native-born American men of the same age. Among native-born men without a high school diploma, about 11 per cent are incarcerated. Among similarly educated Mexican, Guatemalan and Salvadoran men here, only 2 or 3 per cent get incarcerated.

One study of 103 cities between 1994 and 2004 found that violent crime rates decreased as the concentration of immigrants increased. Numerous studies have shown that a big share of the drop in crime rates in the 1990s is a result of the surge in immigration.

Trump plays up the threat of terrorism. But the real threat is that our border agencies spend so much time tracking down people who want to be gardeners that they don’t have the resources to track down the people who want to be suicide bombers. Fighting terrorism by going after the whole swath of immigration policy is like fighting germs with a sledgehammer.

There’s a reason Republicans from Reagan to Bush supported reasonably open immigration policies. They are and have always been good for America.

A new summary of the research from the National Academies of Sciences, Engineering and Medicine found that immigrants are integrating into society as well as ever. The bulk of the evidence shows that immigrants have a hugely positive effect on total American GDP while having little effect on overall wages. The surge in Asian immigration will bring a gigantic number of highly skilled people, who end up with higher education levels than the American average, higher productivity levels and higher incomes

So why is the Trump message selling? Well, economic growth has been slow and wages have been stagnant (mostly because technology is displacing workers). Government is dysfunctional and the immigration issue has become a symbol for how elites are out of touch with the mainstream.

But mostly it’s the clash of two trends: the greying of the GOP and the browning of America. The Republican primary base is more and more made up of older people, who have significantly more negative views about immigration. Second, by 2044, America will be a majority-minority country. This is a very different America than the one people who grew up in the 1960s were used to. It’s a historical transformation that is bound to raise very legitimate concerns.

The way for Republicans to address these concerns, though, is not to build a wall and treat immigrants as suspicious alien invaders. It’s to work on our legal immigration system — make the system ample and streamlined enough so that most people come here in the right way, in a way they can be vetted.

Admit more skilled immigrants and fewer unskilled ones. This would be a giant boon to the economy overall. It would make our immigration policies less geared to serving the elites — giving them ample supplies of nannies and nail polishers. Reducing the supply of unskilled immigrants may do something to raise the wages of unskilled natives and ease their legitimate concerns.

Donald Trump’s GOP is a rear-window party pining for a white America that is never coming back. Ronald Reagan’s GOP, and maybe some future GOP, will fix the immigration system and attract the people who will make the country innovative, dynamic and interesting for decades to come.

— New York Times News Service

David Brooks is a New York Times columnist and author of Bobos in Paradise: The New Upper Class and How They Got There.