Can't say I agree with this, considering lex talionis[1] is still the primary directive of most legal systems when it comes to criminal law, as well as basically all military operations (jus in bello, jus ad bellum, etc.). The principle of proportionality ("an eye for an eye") also is relevant to self-defense, capital punishment, etc.
In fact, I would counter and say that Hammurabi's Code is a quintessential example.
Morality is knowledge, and it evolves like other knowledge does.
Lex talonis is an idea by humans, for humans. At it's core are dozens of untrue assumptions about the way the world, and the other actors in it work. All of those assumptions are about monkey social orders. Many of them are wrong.
For example it assumes the other party can fear, and has a sense of self preservation. Those things are often untrue of other humans, let alone machines.
More fundamentally it also assumes all sort of things about free will itself, implying that retaliation is "deserved" and other value judgments that only make sense if the other party has free will to begin with. Something which science tells us is debatable even about humanity.
No, game theory tells us the right answer and it's not "hold back when retaliating" or "teach them a lesson." Those are things only humans would do, and even then only the ones who share your neurology and upbringing.
Hammurabi's code may feel fundamental, but it's no more fundamental to the human condition than boys preferring blue to pink.