Whoso keepeth the Law is a wise son. "Law" is torah, as Proverbs 28:4; but it seems here to include not only the Decalogue, but also the father's instruction and commands. Such an obedient and prudent son brings honour and joy to a parent's heart (see Proverbs 10:1; Proverbs 29:3).
He that is a companion of riotous men shameth his father; literally, he that feedeth, hath fellowship with, gluttons (Proverbs 23:20). The son who herds with debauchers, and wastes his substance in riotous living, brings shame on, wounds, and insults, all connected with him.
Such a one transgresses the Law and his father's commands, and brings them into contempt (comp. Proverbs 27:11). Hence the antithesis of the two clauses. Septuagint, "He that cherishes debauchery ( ποιμαίνει ἀσωτίαν) dishonours his father."
ἀσωτία occurs only in 2 Macc. 6:4, but is common in the New Testament; e.g. Ephesians 5:18; Titus 1:6.