Are commas and dashes truly interchangeable?

My English teacher told me that "dashes and commas are interchangeable".

For instance, "My friend, Alex, ran to the store." and, "My friend–Alex–ran to the store." are both grammatically correct sentences and have the same meaning.

However, is, "My friend–Alex, ran to the store." a correct sentence? Or can the sentence only have one or the other when a dependent clause is inserted into an independent clause like that?


The teacher is mistaken, though they are equivalent in your first two sample sentences.

"I can't see you -- are you here?" is grammatical, but "I can't see you, are you here?" is a comma splice.

"What the --" isn't a complete phrase, but it's acceptable in dialog. "What the," would not be. Similarly, "What the -- oh, there you are" would be acceptable in dialog, but "What the, oh, there you are" would be a mess.

The last sentence, "My friend–Alex, ran to the store," is indeed incorrect. You can set something off with em dashes or commas here, but not one of each.