The first large walls are older than history – which is to say, older than writing. They are older even than agriculture, or pottery. There was a wall built around the settlement at Jericho, about 10,000 years ago, and it was frequently renewed over the following 5,000 years. Whether it was built to keep out people or floodwaters is disputed among archaeologists, but until recent times it was axiomatic that a wall was built to keep people out rather than to pen them in.
The proposed Calais wall, like the Israeli separation barrier, will look like a fortification from one side and a prison wall from the other. The Berlin Wall, and the iron curtain more generally, were the largest prison walls ever built, since there was no realistic prospect of any invasion from which the minefields and guard towers might protect the people behind them. But the idea of walling in whole peoples seems to have originated in the 20th century.
Before then, the essential function of walls was protection from marauding outsiders. They represented from the beginning quite astonishing feats of social organisation. Even the neolithic walls of Jericho were surrounded by a moat cut by hand through solid rock; 7,000 years later the walls of Nineveh were 16 metres high and nearly as wide, while the walls of Babylon were said by Herodotus to be 63 miles long. Socratic Athens was walled; Rome was walled, and at the extremity of the empire the Romans built both Hadrian’s Wall and the smaller, more northerly Antonine Wall to keep out the barbarians beyond.

This much effort can have been called for only in the face of really dreadful threats. The sack of a city was indeed one of the greatest horrors imaginable, before the 20th century. Baghdad never recovered from its sack by the Mongols in 1258, when perhaps 200,000 people were massacred in scenes of overwhelming destruction.
In the end, walls fail. Even the Great Wall of China failed. The barbarians always get through – unless, that is, the wall is made of water. The hardest siege Alexander the Great faced was the island city of Tyre, which defied him for seven months, because its walls ran all around the shoreline (and when he conquered it he added to the usual horrors of hot-blooded massacre and slavery the crucifixion of 2,000 of the inhabitants).
The idea that the Channel is the natural fortification of this island lurks beneath most of the ways that British history has been told and taught. The Brexit vote was, above all, a demand to pull up the drawbridge in this imaginary wall.
But the Channel was breached nearly 100 years ago, when Bleriot flew across it, in 1909, and the development of air transport has made it an obstacle no more imposing than a hopscotch court chalked on the pavement.
Today most migrants and refugees fly into the country. The wall in Calais looks like a prison from one side – but it will never do what it’s really supposed to, which is to keep out the nightmares of the people who voted for Brexit.