Do you always have to put a comma before someone's name? [duplicate]

Solution 1:

The person to whom one or more sentences are addressed, as their specifically intended audience, can be directly identified and/or recognized with a noun (“Don’t go there, man!”) or a noun phrase (“Don’t go there, old man!”); and in either case the noun may be a proper name. Such an insertion in a sentence can conveniently be termed a vocative, after the actual noun case that distinguishes such insertions in Greek and especially Latin. English, having no such distinctive noun case, brackets these insertions with punctuation: between commas usually, or occasionally between em dashes, or between one such mark and either end of a sentence. Such insertions are parenthetical in character, which means they stand largely or wholly apart from the syntax of those sentences in which they occur.

These punctuational clues are pretty strongly required in written English to prevent our misreading the vocative as something else. In spoken English, however, the overall and largely nonverbal context tends to make the distinction plenty clear. For this reason, commas used to set off vocatives reflect vocal rhythm and inflection far less than most other commas do. Spoken sentences that include vocatives tend to sound very much as if those commas simply were not there. This is a potential source of confusion regarding such commas.

For instance, in the forest rehearsal scene of A Midsummer Night’s Dream, Quince directly addresses his players by their character names, and practically every modern edition uses commas to set off the vocatives, since present-day readers depend on them to identify vocatives as such:

Speak, Pyramus. Thisbe, stand forth.

The first quarto, however, omits them:

Speake Pyramus: Thyſby ſtand forth.

This omission may not be merely at the whim of the typesetter; it corresponds to a thoroughly defensible and arguably optimal way of delivering the line.

One can analyze the letter salutation “Dear John” as a noun phrase comprising a proper name and an adjective modifying it, functioning as a vocative, and therefore sandwiched between the real beginning of the letter’s first sentence and a following comma. But the salutation is a very specialized context with rules and conventions of its own, so this might finally not be the most appropriate way to analyze it. For one thing, the salutation is not typically read as a part of the first sentence but as relating to all the letter’s sentences more or less equally. For another, the “Dear John” letter stereotypically functions to advise John that he is no longer dear.

Solution 2:

Yes, because you are addressing the person. This is in grammars that have the vocative case, and the term is occasionally used in English (grammar). I think of it as the vocative. In English, nouns don't change to reflect this use like Latin, whence the word vocative comes.

A very famous example of the vocative is in Shakespeare's Julius Caesar: "Et tu, Brute?"

The line is delivered in Latin, and here the vocative case is shown through the difference between Brute (vocative) and Brutus (nominative). You'll have to scroll in the link.

which in English is: "and you, Brutus?"

All of your examples are instances of the " vocative case ".