In 1929, the great economist Irving Fisher found his fortune and reputation ruined by his utter failure to forecast the great crash. Rival forecaster Roger Babson commented, not without sympathy, that Fisher’s problem was that “he thinks the world is ruled by figures instead of feelings”.

What a pitiable error. And it’s a warning to economists like me. We like to believe that the numbers speak for themselves, but the political world prefers to think with its gut. Nowhere is this more true than in the case of immigration, which economists tend to conclude is broadly a positive force. Politicians, aware that the world is ruled by feelings, tend to view immigration as something closer to a series of prison breaks: if you can’t get a grip on it, apologise and resign.

Immigration was a centrepiece of Donald Trump’s “build the wall” election campaign. It is a stated reason that the British government intends to go well beyond the referendum result and leave not only the EU but the single market. Immigration inspires strong feelings, and those feelings aren’t of happiness and gratitude. That is a shame.

Is there a gut-based case that we should be grateful to immigrants? I’d like to think so. Perhaps we should start with the golden rule of “do unto others”. It has a clarifying effect on our thinking about immigrants — or “expats”, as the golden rule suggests we call them, since that is what we call ourselves if we go to live overseas. The words are synonyms but the difference in perspective and respect is enormous.

The golden rule quickly exposes much of the talk about immigrants — expats — as hypocrisy. One popular idea is that immigration should be based on some kind of “points” system — or as the White House describes it, “merit-based” immigration. It seems reasonable. But not for a moment would we think of telling someone they couldn’t move from Detroit to Dallas because they “lacked merit”. Vox columnist Matthew Yglesias observes that he wouldn’t get away with describing white Americans without college degrees as people “without merit”. Quite.

Another seductive folly is the idea that the authorities should in their bureaucratic wisdom decide how easy it would be for different industries to recruit workers. As migration expert Madeleine Sumption has recently pointed out, an attempt to fine-tune the labour market through immigration policy might seem attractive, but it would require an extensive and expensive bureaucracy that would swiftly be surrounded by eager lobbyists. We need only ask how we’d feel if such a policy applied to us, with a Whitehall department deciding whether Cambridge required another software engineer.

We might also think that concerns about the “brain drain” were not a persuasive reason to force people from Leicester to stay there on the grounds that Leicester needs their skills. All these policies have managed to pass as moderate, sensible and even compassionate when applied to foreigners. The instant we ask if we’d apply them to ourselves we see them for what they are: a ludicrously cumbersome attempt at economic planning, and a woefully illiberal way to treat human beings.

There are many analyses of the costs and benefits of immigration. What’s not widely appreciated is that most of them simply ignore any benefits to the migrants — expats — themselves. Given this handicap, it’s striking that many serious studies find some modest net economic benefits. If I told you that a school or a hospital could pass a cost-benefit test even after ignoring the benefits to the pupils or patients, you might reasonably conclude that the school and hospital were impressive organisations. You’d also tell me it was a very strange way to do cost-benefit analysis.

In 18th-century France, workers had to show their papers to get permission to move from one town to another. The objection wasn’t that immigrants might arrive. It was that valuable workers might leave.

The French nobles were on to something. In most circumstances we’re keen to live close to other people. Densely populated areas tend to be richer, more productive, and more innovative. Because housing is compact and people travel on public transport, cities are also more environmentally friendly. And we know that cities are desirable places to live because people are willing to pay so dearly to live in them. Usually we view other people as customers, colleagues, and friends. From the church to the high street to the nightclub, other people are the lifeblood of our communities. It is only when we call other people “immigrants” that they seem to cause such anxiety.

I think we should be more grateful to the people who have the courage and energy to leave their homes and make a life somewhere new. But perhaps I’m the one who should be more grateful. As the economist Paul Seabright observes in his 2004 book The Company of Strangers (UK) (US), we humans are the recent descendants of shy, murderous apes. Somehow we have figured out a way to live together and co-operate. We have some way to go, but I am grateful for the progress we have made so far.

First published in the Financial Times on 7 April 2017.

My book “Messy” is available online in the US and UK or in good bookshops everywhere.