Solomon
Proverbs 22:3ESV·traditional attribution

The prudent sees danger and hides himself, but the simple go on and suffer for it.

Matthew Henry Presbyterian @wholebiblehenry

See here, 1. The benefit of wisdom and consideration: A prudent man, by the help of his prudence, will foresee an evil, before it comes, and hide himself; he will be aware when he is entering into a temptation and will put on his armour and stand on his guard.

John Gill Reformed Baptist @doctorgill

A prudent man foreseeth the evil, and hideth himself,.... A wise man, whose eyes are in his head, who looks about him and before him, and is cautious and careful of his conduct and behaviour; he foresees the evil of sin he is liable to be drawn into by such and such company, snares, and temptations; and therefore he keeps from them, and abstains from...

Jamieson-Fausset-Brown Reformed @jfbcommentary

are punished--that is, for their temerity; for the evil is not necessarily punitive, as the prudent might otherwise be its objects.