WE are long past the times when the Edinburgh Festival used to deliver the biggest culture shocks. Nowadays we need to look to Irish politics, as to the rather sensational journey of the gay Taoiseach, Leo Varadkar, from Dublin to Belfast and into the Northern Irish heartland of social and political conservatism.

In the old days the people there could fortify their loyalty to the UK with the thought that the Republic to their south was a bastion of black reaction under the thumb of an authoritarian Catholic clergy.

We already knew of priests who were cruelly treating unmarried mothers, to the extent of driving them to abortions in Britain. We have since found out about other priests who were abusing orphaned boys as well, something which in that era could not even be spoken of. At any rate Ulster, while hardly a beacon of liberal morality, could at least comfort itself with the thought that it formed part of a UK polity that had always, by its own lights, defended its citizens’ personal freedoms.

READ MORE: Number 10 rejects claims of being 'a bit absent' on Brexit talks after senior diplomat blames cabinet infighting

Now in the 21st century the Irish tables are turned. The Republic has taken a roller-coaster ride to economic and cultural modernity, with booms and busts that make those in the UK look like gentle effervescence. In Irish society the most visible losers have been speculative builders and their financial backers.

But close behind comes once again that callous clergy, implicated in a further string of damning revelations exposing the hypocrisy of the old-time religion. The scene looks pretty hair-raising, especially to the Ulster Protestants who gaze at it across the border.

Yet they are the ones who, after the southern catharsis, seem to be left politically and psychologically confined by their history – especially with Brexit in prospect, imposing choices that appear in every way unpalatable.

The first reaction seems to have been a flight into intransigence, but this is deceptive. The Democratic Unionists, though the only one of Northern Ireland’s various Protestant parties to have maintained representation at Westminster, still represent a decaying tradition. At the UK General Election, younger voters especially turned to less hoary alternatives, leaving Unionism collectively for the first time with less than 50 per cent of the vote. This opens the possibility that one day a fresh border poll, as provided for under the Good Friday Agreement of 1998, might bring about Irish unity. We would no doubt be a little premature to speculate on that outcome. But the historical tides are flowing in its favour, and no ebb is at present in sight.

The flow has quickened recently. The Democratic Unionists, while also trying to prop up the Tory Government at Westminster, want two contradictory things. They want a hard Brexit. But they also want the Irish border to remain as open as can be managed in the circumstances, because their province’s limping economy continues to need all the help it can get. The combination looks, and probably is, impossible. Now Varadkar has stepped in with a proposal of his own.

In effect it provides for a new local form of economic union after Brexit, covering the whole island of Ireland and replacing the wider European economic union which has existed up to now. No border would reappear along the old sinuous line between Newry and Derry. Instead there would be a semi-border down the middle of the Irish Sea, marking an economic boundary but not a political boundary, since Northern Ireland would remain part of the UK. This semi-border would still need to be policed. It might mean customs and immigration controls at crossings into Scotland, for instance at Stranraer and Craigryan, possibly at Campbeltown too. Perhaps the Royal Navy would have to patrol the North Channel to see that no boat people coming from Bulgaria via Ireland could penetrate the secluded inlets of Galloway.

Varadkar’s plan would be pretty much of a legal and administrative nightmare, but it is also analogous to a concept that our own government entertains for post-Brexit Scotland. Nicola Sturgeon, while now accepting we must leave the EU in 2019 whether we like it or not, yet hopes we can remain part of the single market and the customs union. She has indeed set all this out in a formal proposal to the UK Government, which has not bothered to reply.

Theresa May and her merry men clearly do not want to encourage any notions of a differential Brexit in the smaller nations of the UK, for fear that greater economic autonomy may imply greater political autonomy, indeed effective independence. But the perhaps otherwise insoluble problem of Northern Ireland could force their hand. The EU’s chief negotiator, Michel Barnier, has after all repeatedly said that, without a solution to that problem, there can be no progress towards the new, comprehensive trading relationship the UK Government wishes. The complex bargaining in Brussels could well be halted at this stumbling block, leaving the UK to crash out of Europe without agreement.

It is obviously a position the Scottish Government might be able to exploit. The time is not yet ripe, but could be upon us at any moment. In Scotland the very idea of border controls at Berwick and Carlisle has always been regarded as part of a horror scenario, the mere mention of which will put most Scots off. But would they seem so bad if there were already controls at Stranraer, Cairnryan and Campbeltown, imposed to save us from a Brexit with no deal?

The question follows from the fact that immigration is the point on which Scottish interests most clearly diverge from the Brexit positions taken up by the UK Government. Prompted by the ignorant prejudices of provincial England, the illiberal May wants to stop European migrants coming to fill jobs the English are no longer willing to fill themselves. I think this project is doomed to continuing failure, but that is another matter.

What it will certainly do is damage Scotland, where the most pressing need is for a faster rate of economic growth, requiring in turn an expanded workforce. With our falling birthrate, only immigrants can supply it. We should therefore continue to welcome the Poles and the Portuguese, and indeed on the whole we do. The only problem is that, within the UK, there is no way to prevent them moving on into England in due course if this is their choice. There is no way, at least, unless we impose border controls of some sort (which may be administrative rather than physical). Would we rather have these controls than no growth? It is a question we may need to face before long.

We should start thinking about all these options because of the state of confusion over Brexit inside the UK Government. As the two-year timetable for the negotiations ticks away, all kinds of solutions to all kinds of problems may turn from looking improbable to being the least bad available to us. I wish we had some thinking as radical and as free from the weight of history as that of the gay Taoiseach. It cannot be expected that the issues surrounding immigration to Scotland will ever mount very high up the agenda of the UK Government. If we have ready proposals to meet the needs of desperate men and women round the cabinet table at No.10 when the Brexit negotiations crash, we may yet achieve more in our own interests than seems possible at the moment.