The former view is more correct, for the Sunnah of the Prophet, may Allah bless him and grant him peace, established retaliation in such cases, as did the practice of the Rightly Guided Caliphs. Allah Most High said:
“The recompense for an evil deed is an evil deed like it.”
Allah Most High also said:
“If anyone commits aggression against you, retaliate against him in the same measure as his aggression against you.”
There are other passages to the same effect.
As for the assertion that exact equivalence is unattainable in this kind of injury, the answer is that such an injury must incur a punishment: either retaliation or discretionary punishment. If discretionary punishment is permitted even though its kind and extent are not precisely defined, then imposing a punishment that can be more precisely measured is all the more fitting and appropriate. Justice in retaliation is required to the extent possible. It is well known that striking an assailant with a blow equal or close to his own is nearer to justice than subjecting him to discretionary punishment by flogging. Thus, whoever prohibits retaliation in such cases for fear of injustice permits something more unjust than what he sought to avoid. This shows that what the Sunnah prescribes is more just and more appropriate.
Likewise, a person may answer an insult with the same insult, such as cursing someone just as that person cursed him. If someone says, “May Allah disgrace you,” he may reply, “May Allah disgrace you.” If someone says, “May Allah humiliate you,” he may reply, “May Allah humiliate you.” If someone says, “You dog! You pig!” he may reply, “You dog! You pig!”
But if the speech is of a kind that is inherently forbidden, such as declaring him a disbeliever or lying about him, he may not declare the other person a disbeliever or lie about him in return. If the other person curses his father, he may not curse that person’s father in return, for that father has done him no wrong.