The famous “To be, for not to be” soliloquy from William Shakespeare’s Hamlet employs numerous literary techniques or poetic devices, including the following:
- Juxtaposition, in which two ideas (often opposites) are placed side-by-side, often for purposes of contrast, as in “To be, or not to be” (3.1.55).
- Enjambment, in which a poet moves from one line of poetry to another without punctuation at the end of the first line, so that the first line flows smoothly into the next, as in lines 56-57:
Whether ’tis nobler in the mind to suffer [no punctuation here]
The slings and arrows of outrageous fortune . . .
- Metaphor, in which a comparison is made without using the words “like” or “as.” Thus the phrase “The slings and arrows of outrageous fortune” (3.1.57) compares misfortune to being assaulted in a battle.
- Fitting syntax to phrasing, or making the structure of a sentence conform to the meaning of a sentence. Thus, at the very end of the soliloquy’s first sentence, Shakespeare appropriately inserts the words “end them” (3.1.59).
- Repetition, as when Hamlet repeats the phrase “To die, to sleep” (3.1.59, 3.1.63) and then immediately repeats “To sleep” again (3.1.64).
- Iambic pentameter meter, in which odd syllables are unstressed and even syllables are stressed, as in the following line: “For in that sleep of death what dreams may come . . .” (3.1.65).
- Rhythmic variation, as when Shakespeare departs from predictable iambic patterns to give greater emphasis to certain words, as in this line: “That makes calamity of so long life” (3.1.68).
- Alliteration, which usually involves the repetition of consonants, as in “so long life” (3.1.68).
- Assonance, which usually involves the repetition of similar vowel sounds, as in “so long life” (3.1.68).
- Return to regular rhythm after departure from it, as in
That makes calamity of so long life:
For who would bear the whips and scorns of time . . . (3.1.69)
- Catalogues, in which key terms are listed so that each gets great emphasis and so that much information is communicated quickly and efficiently, as in
For who would bear the  whips and  scorns of time,
Th’ oppressor’s  wrong, the proud man’s  contumely,
The  pangs of despis’d love, the law’s  delay,
The  insolence of office, and the  spurns . . . (3.1.69-72)
- Contrasting phrases, as in the lines
Thus the native hue of resolution
Is sicklie’d o’er with the pale cast of thought . . . (3.1.83-84)
Many of the techniques listed above are used more than once. Thus, Hamlet’s soliloquy is full of metaphors, and alliteration is often used (as in “bare bodkin”  or “conscience does make cowards” ). Significantly, no similes (comparisons using “like” or “as”) are used, as if to suggest that Hamlet is not consciously trying to make comparisons but is making them almost automatically, without deliberate fore-thought.