Socrates vs. Hamlet

I’ve read these passages I don’t know how many times, but before today it never occurred to me to pair them against each other.

First, Socrates:
To fear death, gentlemen, is no other than to think oneself wise when one is not, to think one knows what one does not know. No one knows whether death may not be the greatest of all blessings for a man, yet men fear it as if they knew that it is the greatest of evils.
Apology 29a (trans. G.M.A. Grube).

Second, Hamlet:
To be, or not to be: that is the question:
Whether ’tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them. To die, to sleep –
No more – and by a sleep to say we end
The heartache, and the thousand natural shocks
That flesh is heir to! ’Tis a consummation
Devoutly to be wished. To die, to sleep –
To sleep – perchance to dream: ay, there’s the rub [impediment],
For in that sleep of death what dreams may come,
When we have shuffled off this mortal coil [turmoil],
Must give us pause. There’s the respect [consideration]
That makes calamity of so long life [(1) makes calamity so long-lived; (2) makes living so long a calamity]:
For who would bear the whips and scorns of time,
Th’ oppressor’s wrong, the proud man’s contumely [harsh language or treatment arising from haughtiness and contempt],
The pangs of despised love, the law’s delay,
The insolence of office, and the spurns
That patient merit of th’ unworthy takes,
When he himself might his quietus [full discharge (a legal term)] make
With a bare bodkin [dagger]? Who would fardels [burdens] bear,
To grunt and sweat under a weary life,
But that the dread of something after death,
The undiscovered country, from whose bourn [region]
No traveler returns, puzzles the will
And makes us rather bear those ills we have,
Than fly to others that we know not of?
Thus conscience [self-consciousness, introspection] does make cowards of us all,
And thus the native hue of resolution
Is sicklied o’er with the pale cast [color] of thought,
And enterprises of great pitch [height (a term from falconry)] and moment
With this regard [consideration] their currents turn awry,
And lose the name of action.
Hamlet III.i 56–88. Text and notes from The Complete Signet Classic Shakespeare – excepting the note for “contumely” (Merriam-Webster).

Cephalus, the old man in Republic, bk. I, fears death enough to rejoice that his wealth has guarded him from having to resort to injustice (as the poor often must do).