Aegeon states that his two sons were so identical when they were young that they could be distinguished by name only, a claim that is deeply ironic, since much of the play's plot stems from the confusion brought about by the fact that his twin sons even share the same name—something he apparently does not know. He says:
There had she not been long but she became
A joyful mother of two goodly sons,
And, which was strange, the one so like the other
As could not be distinguished but by names
In narrating the events of his sons’ birth, Aegeon emphasizes that they resembled each other so closely that no physical feature could be used to tell them apart, adding that they're identical in all but name. As a result of the storm that divided his family, Aegeon has not seen his wife, nor one of his sons, since shortly after the birth. Ironically, then, he does not yet know that he and his wife have chosen the exact same name for their separated sons (Antipholus)—an absurd coincidence that he could hardly have anticipated.
In fact, Aegeon won’t discover that his sons share a name until the very end of the play, by which point this implausible coincidence has brought chaos to the lives of both Antipholus of Syracuse and Antipholus of Ephesus. This remarkable set of coincidences—that two identical twins share a name, as do their respective slaves, who are also identical twins—is essential to the comic plot of the play. Aegeon’s unknowing description of his sons as indistinguishable “but by names” becomes funnier and even more ironic as the various cases of mistaken identity unfold on the stage. What's more, once the audience discovers that the twins have the same name, the entire situation becomes an instance of dramatic irony, too, since the audience knows something crucial that Aegeon himself doesn't know.