All good dramas involve the suspension of disbelief. So it was with Brexit. I went to bed at 4am last Friday depressed that Britain had voted to leave the European Union (EU).
The following day, my gloom only deepened. But then, belatedly, I realised that I have seen this film before. I know how it ends. And it does not end with Britain leaving the EU.
Any long-term observer of the EU should be familiar with the shock referendum result. In 1992, the Danes voted to reject the Maastricht Treaty. The Irish voted to reject both the Nice Treaty in 2001 and the Lisbon Treaty in 2008.
And what happened?
The EU rolled ever onwards. The Danes and the Irish were granted some concessions by their EU partners. They each staged a second referendum - and voted to accept the treaties. So why, knowing this history, should anyone believe that Britain's referendum decision is definitive?
It is true that the British case has some novel elements. Britain voted to leave the EU altogether. It is also a bigger economy than Ireland or Denmark, which changes the psychology of the relationship.
And it is certainly true that the main actors in the drama seem to think it is for real. Prime Minister David Cameron announced his resignation following the vote; and Mr Jonathan Hill, Britain's EU commissioner for financial services, has followed suit.
Yet there are already signs that Britain might be heading towards a second referendum rather than the exit door. Mr Boris Johnson, a leader of the Leave campaign and Britain's probable next prime minister, hinted at his real thinking back in February, when he said: "There is only one way to get the change we need - and that is to vote to go; because all EU history shows that they only really listen to a population when it says No."
Having been a journalist in Brussels at the time of the Danish referendum on Maastricht, Mr Johnson is very familiar with the history of second referendums. It is also well known that he was never a die-hard Leaver, and hesitated until the last moment before deciding which side to back.
His main goal was almost certainly to become prime minister; campaigning to leave the EU was merely the means to that end. Once Mr Johnson has entered 10 Downing Street, he can reverse his position on the EU.
But would our European partners really be willing to play along? Quite possibly. You can already see it in the talk by Mr Wolfgang Schauble's Finance Ministry in Germany of negotiating an "associate" membership status for Britain. In reality, Britain already enjoys a form of associate membership since it is not a participant in the euro single currency or the Schengen passport-free zone.
Negotiating some further ways in which Britain could distance itself from the hard core of the bloc, while keeping its access to the single market, would merely elaborate on an existing model.
And what kind of new concession should be offered?
That is easy. What Mr Johnson would need to win a second referendum is an emergency brake on free movement of people, allowing Britain to limit the number of EU nationals moving to the country if it has surged beyond a certain level.
In retrospect, it was a big mistake on the part of the EU not to give Mr Cameron this concession in his renegotiation of the terms of British membership early this year. It was his inability to promise that Britain could set an upper limit on immigration that probably ultimately lost him the vote.
Even so, with 48 per cent of voters opting to stay in the Union, the result was extremely close. If the Remain campaign could fight a second referendum with a proper answer to the question of immigration, it should be able to win fairly easily.
But why should Europe grant Britain such a concession on free movement? Because, despite all the current irritations, the British are valuable members of the EU. Britain is a big contributor to the Budget and it is a serious military and diplomatic power.
Just as it will be painful for Britain to lose access to the EU's internal market, so it will be painful for the EU to lose access to the British labour market. More than three million EU nationals live and work in Britain, with more than 800,000 from Poland alone.
Agreeing to an emergency brake on free movement of people might mean some modest limits to future migration. But that would surely be better than the much harsher curbs that could follow a complete British withdrawal from the EU.
Of course, there would be howls of anger on both sides of the Channel if any such deal is struck. The die-hard Leavers in Britain would cry betrayal, while the die-hard federalists in the European Parliament - who want to punish Britain and press on with "political union" in Europe - will also resist any new offer.
But there is no reason to let the extremists on both sides of the debate dictate how this story has to end. There is a moderate middle in both Britain and Europe that should be capable of finding a deal that keeps Britain inside the EU.
Like all good dramas, the Brexit story has been shocking, dramatic and upsetting. But its ending is not yet written.
THE FINANCIAL TIMES