Let’s play ‘sharing a platform’ deathmatch. It’s like the end of Reservoir Dogs but with puritanism instead of guns.

Labour shadow chancellor John McDonnell is angry at Sadiq Khan for sharing a platform with David Cameron on a campaign event for Remain. "Sharing a platform with them discredits us," he told an audience member at a campaign event in Wolverhampton. "It demotivates the very people we are trying to mobilise."

There's been plenty of negative coverage of these comments but they're hardly unusual. Nicola Sturgeon refuses to share a platform with Cameron too. "I have got no plans to share platforms with David Cameron or George Osborne or anybody else in the Conservative Party," she told Sky News's Murnaghan show last year, before stressing, seemingly without irony, that she would make "a very strong and very positive case for our membership of the European Union".

She has a good self-interested reason for adopting that position. After all, the SNP made Labour pay heavily for sharing a platform with the Tories during the referendum over Scottish independence. Many pundits credit it with the complete collapse of the Labour brand north of the border.

Cameron, meanwhile, is angry that Khan shared a platform with Suliman Gani, a conservative Islamic figure. "If we are going to condemn not just violent extremism but also the extremism that seeks to justify violence in any way, it is very important that we do not back these people and that we do not appear on platforms with them," he told the Commons. It was enough to make him express his concerns about "Labour's candidate for mayor of London".

Defence secretary Michael Fallon went further, saying Khan was a "Labour lackey who speaks alongside extremists" and had proved himself "unfit" to be mayor.

And of course, it was Jeremy Corbyn's opponents on the right, particularly in the press, who spent days obsessing over all the people he had shared a platform with before he became leader. Moral hypocrisy is circular.

This is the political world we live in now, the world of incessant calls for purity. It's a place where even being prepared to debate with someone you don't agree with is considered an ethical failing or – a tad more sophisticated – an unhelpful strategic move which will demoralise your followers.

And they're right – people are demoralised by it. That abysmal SNP message worked in Scotland. Labour has been punished over and over again for daring to cooperate with the Tories to save the Union. They were punished after the referendum, punished at the general election and then punished again in the local elections. The coming together of political opponents to campaign for an issue on which they share a position is now considered toxic. And if it wasn't coming from the SNP it was coming from the Tories themselves. After all, the Tory fear-mongering over Labour-SNP cooperation in government is considered one of the chief reasons they won a majority.

The mainstream politics of Westminster seems to have become just as thin-skinned and demonstrative as student politics, where sharing a platform long ago became a euphemism for corrupt bourgeois complacency.

When Fran Cowling, National Union of Students (NUS) representative for LGBT issues, refused to share a platform with Peter Tatchell recently, she did so by claiming he was a transphobe. The only evidence she cited for this was that that Tatchell had recently signed an open letter criticising those trying to prevent feminist Germaine Greer from giving a speech.

Greer certainly talks on the matter with less reserve and basic politeness than one might wish, but whether that deserves the moniker 'transphobe' is another matter. What’s interesting is that Cowling seems to equate Tatchell defending Greer's right to speak with him holding the same views. And that's where the nub of the opposition to platform sharing comes from: a fear, or suspicion, that political views are spread by osmosis between two people in each other's physical or intellectual proximity.

Under this worldview, it is not possible to agree on one matter, work together on it, and disagree on others. It is not possible to support someone's right to speak without sharing their views on the things they are speaking about.

I am occasionally asked to sign these open letters to newspapers objecting to whichever act of no-platforming has taken place at a university. Sometimes, even these letters fall prey to it. One of the signatories will object to being included in the same letter as another signatory due to their views on some matter or other (almost always connected to identity politics of some sort). And then, like the Monty Python joke I am, I get into a moral debate about whether I want to stay as a signatory given the fact that the other signatories clearly don't believe in the political principle the letter is purporting to defend. And on and on it goes: absurd. None of us are immune.

There are two options in politics: stay pure and accomplish nothing, or compromise and affect change. No one ever changed anything on the basis of moral purity. The history of radical change is the history of principled men and women making painful compromises. It's terribly easy to sit on the sofa and shout righteous indignation at the television. It's much harder to work on how to expand the audience which might be interested in your campaign, to convert those who might be open to some of your ideas. But as soon as you do that, as soon as you get into the mucky business of debate and compromise and practicality, there will always be people out there calling you a traitor to the cause.

It’s always been like that, but right now it's worse than ever. Much of the blame must surely rest with the digital echo chambers of social media, the daily self-propaganda machine in which we can surround ourselves with those who already think like us and then shriek with outrage when the it turns out the world does not agree.

It's making us incapable of nuance or compromise and highly sensitive to the visuals of cooperation, which we take to be a sign of corruption. That's where the online and student debate is. And mainstream politics is just now learning to profit from it. The SNP and the Tories have proved highly adept at it. And Labour, previously the victim of these efforts, is now gearing up to use the same rhetoric itself. The frenzied tactics of student politics and Twitter shouting matches are increasingly the common currency in Westminster.

But what began at a grassroots level can be combated at a grassroots level. People should be celebrated for debating their opponents. They should be praised for being willing to work together on issues of common interest. We should never accept the notion that there is something morally corrupt about any of these activities.

Share a platform with anyone.

Ian Dunt is the editor of Politics.co.uk

The opinions in politics.co.uk's Comment and Analysis section are those of the author and are no reflection of the views of the website or its owners