As previously stated, all are accurate grammatically. Although they are extremely similar in meaning, there are subtle differences, and the different techniques may be used in different cases and for different reasons. Here is why and when each may be used.
Notes ✎ Participles
Participles are words that come from verbs. Like verbs, they describe actions, however they can be used like adjectives.
There are two types of participles:
- Present Participle: typically ends in "ing"
- Past Participle: often the same as the verb's past tense (eg: made) but not always.
- verb: to go
- present participle: going
- past participle: gone
Let's look at your sentences:
I was having dinner, talking to my wife.
In English, adjectives are sometimes placed after a noun, typically as a phrase and using a comma to separate them.
E.g. "The girl, strong and brave, boldly faced the rattling serpent"
In the above example, "strong and brave" describe "the girl". It is no different with participles, which are often used this way since they can be followed by phrases like the verb would. In the first example, this is the structure being used, with "talking", the present participle of "to talk", referring directly to the speaker.
Compared to the other three sentences, this structure is typically used to show one action being more important in the message than the other.
The tall boy is strong
In the above example, the speaker is trying to convey that the boy is "strong", not really that the boy is "tall". The word "tall" is only present to describe the boy, in this case, to identify which boy is meant. Likewise, in the first sentence, "talking to my wife" is only there to describe what is happening in the background while the speaker is having dinner.
I was having dinner and talking with my wife.
In each of the last three sentences, conjunctions are used instead: "and", "as" and "while". The difference between each of these sentences is the meaning of the conjunctions.
and - "and" is a pretty basic conjunction that shows that both "I was having dinner" and "I was talking with my wife" are true.
as - "as" can be used to mean "while" or "because". It is generally used to specify what case an action occurs in: "I was having dinner" occurred when "I was talking with my wife".
while - "while" is also a pretty basic conjunction meaning "at the same time".
Lastly, you can also swap these conjunctions with pretty much any other similar conjunction, though some may not make sense in almost any situation, however they would be grammatically correct.
I was having dinner because I was talking with my wife. (I guess talking to his wife makes him hungry)
I was having dinner but talking with my wife. (Some people just want to eat in peace and quiet)
I was having dinner then I was talking with my wife.