Perennial Question

I was idly looking at the graphic below, which depicts Britain’s new royal line of succession:

Now like for most people, the succession thing is about as interesting to me as which rain droplet will reach the bottom of the windowpane first, but it does bring to mind a question which has bothered me since high school, and has never been satisfactorily answered.

It’s Shakespeare’s Hamlet.  Now as any fule kno, the plot is that Hamlet’s eeeevil uncle Claudius poisoned Hamlet’s father the king, then married Hamlet’s mother Gertrude to become the new king.

Given that Hamlet was alive when his father was murdered and was therefore first in the line of succession, why did Hamlet not become king?  If I understand the rules properly, when the king dies, his wife becomes irrelevant to the whole thing, and anyone she marries afterwards even less relevant.  Claudius, therefore, had absolutely no claim to the throne (despite being Hamlet’s father’s brother) and could never have become king, unless he’d had Hamlet killed beforehand.

Or does / did Denmark have a different succession plan?  I don’t think so.

So the entire plot of Hamlet, then, is a load of old bollocks:  the uncle’s accession to the throne being simply what Alfred Hitchcock called the “mcguffin” (a device upon which to hang a plot line, requiring the suspension of disbelief from the audience, e.g. John Huston’s stolen Maltese falcon, or Casablanca‘s “letters of transit signed by General de Gaulle”).

Not that I care, mind you;  without that Shakespearean mcguffin, we’d never have been given the deathless “To be, or not to be”  speech, or seen that old busybody Polonius get a rapier through his arras.