The phenomenon of black characters being the first to die was first identified in Hollywood horror movies. From the golden age of horror in the 1930s onwards, alert viewers have noticed the short shelf-life of black characters.

In the first half of the twentieth century, black actors often had little name recognition in Hollywood, and audiences weren’t invested in seeing them on the screen for an extended period. They were added to the script to relieve the unremitting whiteness of the casts. Their role was to die early, leaving the field clear for the white hero to save the day.

In short, it was an egregious form of systemic racism.

What might be dismissed as a cultural curiosity in 1930, becomes inexcusable in 2017. While actors like Denzel Washington and Will Smith have become global superstars, capable of carrying big-budget movies on their own, black characters still don’t get anything like equal treatment from Hollywood. The lack of substantial roles has a knock-on effect for black actors, which contributes to the #OscarsSoWhite problem.

Many viewers have noticed that the “black guy dies first” trope has moved sideways into the world of television series. Fortunately, the power of social media means that viewers and reviewers are less forgiving than they used to be, and come down hard on tokenism when they spot it.

But what about literature? What excuse can there be for a writer, who has no budgetary considerations, to treat black characters as literary canon-fodder? It reeks of an attempt to add diversity to a novel without committing to any in-depth or long-term development of the character.

In his seminal article for Granta, Binyavanga Wainana skewers western writers who use Africa and Africans as a picturesque backdrop for their white characters to live out their heroic destinies. He warns against the narrative that paints African characters as poor, desperate, disease-ridden, and dying.

In her TED Talk, “The danger of a single story”, Chimamanda Adichie issues similar warnings. Between them, these two African writers have placed the literary world on notice. It is no longer acceptable for Western writers to live out their “good man in Africa” fantasies at the expense of black characters.

And yet the problem persists. Black characters continue to be used as literary casualties, which raises the question whether there is ever a good way for white writers to deal with the deaths of black characters.

I had occasion to consider this recently when I was working on a novel in which one character – a white woman – survives an event that kills everyone else. One of the characters who dies is a black man, and killing him on the page is the hardest thing I’ve done as a writer. It led to some rigorous self-examination about what exactly his role in the novel was.

The “black guy dies first” trope is offensive when the character is used as nothing more than a vehicle to move the plot to a point where white characters can fulfil their heroic destinies.

One example that bears further scrutiny is the death of Zora in Lauren Beukes’s “The Shining Girls”. Zora is a widowed mother of four who works as a welder in a shipyard in 1943. Her death at the hands of the serial killer Harper is one of the most shocking moments in the book. But does Zora’s death merely thin out the cast to allow the white heroine Kirby to swing into action?

I would argue not.

Zora is one of the most interesting and well-developed characters in the book – possibly in all of Beukes’ books. As soon as a character is that well realised on the page, she ceases to be merely a cipher, and becomes an integral part of the narrative.

Perhaps that is the best test for whether the death of a black character is mere tokenism or not. If the character, however minor, has been thoughtfully drawn, with proper research and respectful attention to detail, then we are probably not dealing with tokenism.

As US Supreme Court Justice Potter Stewart said in 1964 with regard to the threshold test for obscenity, “I know it when I see it.” Most of us know tokenism when we see it, and will hopefully see a lot less of it in the future.