For me, truly great comedy has to have two ingredients.
It has to have a character or characters who are trapped in their situation, and it has to have tragedy just below the surface, occasionally dipping into it, and then out again.
If that is done with real skill, then it is utterly captivating.
For me, the comedies that fulfill those criteria are -
Steptoe and Son - when Albert went from spitting poison to suddenly looking utterly frightened and vulnerable at the thought of Harold leaving him. Wilfred Bramble's ability to change his face from malice to fear and back again is seconds was just masterful.
One Foot In The Grave - just once, for about thirty seconds, Victor and Margaret made reference to a baby they had had, which obviously did not survive. In six series, it was only mentioned that once, a blink, and it was gone, but it was wonderful how cleverly it was put into the plot.
Fawlty Towers - who could be more trapped than Basil? And yet, as John Cleese and Connie Booth said, when they wrote him, they laughed and laughed, but they also ached for him, he so nearly got it right, but never quite managed it.
Hancock - another of life's losers, doomed to be forever railing against his lot in life, but with such humour, made it wonderful.
Frasier - doomed to be stuck in a world that fails to understand his desire to higher cultural experiences, manacled to his father, and his father's chair, and hie father's dog. Dependent on his brother, tussling with his ex-wife, and again, all done with such fabulous writing and plots.
Dinner Ladies - with Victoria Wood's golden ear for the nuances of dialogue, and the pathos built into superbly funny interactions of the cast.
Father Ted - doomed never to forget the funds 'resting in his account' and doomed forever to Craggy Island and Dougal and Father Jack. Always hoping for better, never ever getting there. The Eurovision Song Contest entry was peerless comedy.
But of course, comedy is entirely subjective, and I wonder to this day, the appeal of a show like Last Of The Summer Wine - a bunch of unlikeable and unsympathetic characters carrying on like small boys - the modern equivalent is clearly Top Gear!
Allo Allo - an endless repetition of catch phrases that were not funny the first time, coupled with lazy cultural cliches, naff in the extreme.
Love Thy Neighbour - a comedy that relies entirely on a cliched pointless joke - that a white man and a black man are pointless bigots shouting the same cliched insults week in week out. A series with no redeeming qualities whatsoever.
Mind Your Language - more shallow redundant cultural stereotyping leading to seriously unfunny exchanges, because the scripts were bereft of anything approaching imagination.
The Good Life - a bizarre premise in which an unpleasant pen pusher subjects his meek little wife to a third-world existence to realise his own pointless ego trip. Further despised for Felicity Kendal, whom everyone seemed think was gorgeous, but looked like a hamster and spoke with a voice that sounded like a cat sliding down a blackboard.
That's it for now, but I may have further observations when others remind me of comedies I have forgotten about.