The question of how to deal with society’s most undesirable people is one of the most difficult we face.

In last week’s excellent Black Mirror TV drama (spoiler alert) the public had turned into voyeuristic vigilantes, replicating a killer’s most heinous act against the perpetrator. It’s disturbing to watch, not just because of the original crime but for the relish – the delight even – with which the public watches punishment dished out.

The programme is supposed to be a dystopian, exaggerated look at a world which has spun out of control.

Yet one look at the Twitter response to yesterday’s announcement from the attorney general, Dominic Grieve, about Jon Venables and Robert Thompson suggests it is closer to the truth than we’d like to contemplate.

Venables and Thompson were 10 years old when they killed toddler James Bulger in 1993. They were each given new identities upon release and have since remained largely anonymous, until pictures of Venables as an adult were apparently posted online on 14 February.

Grieve has announced the decision to institute contempt proceedings against individuals who posted photographs purporting to be of Venables or Thompson. The relevant court papers will be served shortly.

The Twitter response was predictably venomous, with these just a sample:

‘Jon Venables and Robert Thompson should be tortured as slowly as physically possible, b*llocks with keeping their new identities secret’

‘Why are Jon Venables & Robert Thompson protected more than any other people in this country?’

‘It annoys me to the core that the identities of Jon Venables and Robert Thompson are not allowed to be published.’

But what the attorney general has done is right. These pictures were contravening an existing court order – there was simply no choice but to prosecute. He also made the salient point that, by implication, no one actually knows what Venables and Thompson look like, meaning there have been several photos claiming to be of the pair.

Innocent people will have been wrongly identified and will be in grave danger as a result.

And ultimately, certain members of the public need protecting from themselves. Venables and Thompson are free to live their lives, subject to monitoring, and must be helped to do so. That means it is essential their identity is protected at all times.

In Charlie Brooker’s alternative reality of Black Mirror the public were bloodthirsty, brutal monsters with scant regard for another human being.

The calls for retribution are scarily similar in the real world, and the authorities are right to prevent any escalation. What would happen if Venables or Thompson were ‘outed’ does not bear thinking about it – for all our sakes.

John Hyde is a Gazette reporter

Follow John on Twitter