Solomon
Proverbs 19:25ESV·traditional attribution

Strike a scoffer, and the simple will learn prudence; reprove a man of understanding, and he will gain knowledge.

Matthew Henry Presbyterian @wholebiblehenry

Note, 1. The punishment of scorners will be a means of good to others. When men are so hardened in wickedness that they will not themselves be wrought upon by the severe methods that are used to reclaim and reform them, yet such methods must be used for the sake of others, that they may hear and fear, Deu 19:20.

John Gill Reformed Baptist @doctorgill

Smite a scorner, and the simple will beware,.... That is, give reproof to a man that scoffs at religion, and makes a jest of all that is good; for though it may be of no use to him who will despise it, yet it may be observed, and be useful to another that hears it; who, though void of understanding, yet not hardened in impiety...

Jamieson-Fausset-Brown Reformed @jfbcommentary

Such is the benefit of reproof; even the simple profit, much more the wise.