With the death of Iain Banks, British literature has lost a firecracker, a man and a writer whose mordant wit and passionate political convictions lit up his conversations and the page.

In the often viperish literary establishment, nobody had a bad word for him. Long before he announced he had terminal cancer readers, friends and fellow writers spoke of him warmly, both as a novelist, and as a man.

In the weeks since he revealed he was dying, there has been an outpouring of affection and respect for a writer who at his best was one of the most influential and inventive novelists of his generation, and even when below par was never less than infectiously entertaining. One Scottish novelist told me last week that Banks recently took the time to read and respond enthusiastically to his latest book, a remarkably generous act, he said, for someone with so little time left.

In public, Banks put a humorous and stoical face on his illness. In his final novel, The Quarry, published next week, a darker mood emerges in the person of Guy, a man in his late thirties dying from cancer, who rails against the world, and against death.

As he says in one of his outbursts, "I shall consider myself well rid of this island's pathetic, grovelling population of celebrity-obsessed, superficiality-fixated w*nkers. I shall not miss the institutionalised servility that is the worship of the royals - or the cringing respect accorded to the sh***ing out of value-bereft Ruritanian 'honours' by the government of the f***ing day, or the hounding of the poor and disabled and the cosseting of the rich and privileged -"

Those who know Banks and his work will recognise the author's own beliefs, writ large and loud. As Guy admits, such a rant is his way of looking on the bright side. When he dies, he says, "I shall be free of that nagging, sensation that I am, for the most part, surrounded by f***ing idiots."

But while the fictional Guy is deeply, almost comically unlikable, anyone who ever met Banks will find it hard to think of a more affable, sociable and laid back bloke.