John Gill's Exposition of the Whole Bible
Joshua 23:7
That ye come not among these nations, those that remain among you,.... That remained unsubdued, or that were suffered to dwell among them, being tributaries to them; with these they were not to converse freely and familiarly, nor to carry on trade and commerce with them, nor enter into any alliances or marriages with them, and not even attend any of their feasts, and especially their idolatrous ones:
neither make mention of the name of their gods; not in common conversation, and still less in any religious matters; never with any reverence of them, or in any respectable manner; but always with indignation and contempt, calling them dunghill gods, and the like, as they often are in Scripture:
nor cause to swear [by them]; neither swear by them themselves, nor cause others to swear by them, as Abarbinel; or a man his neighbour, as Kimchi; no, not a Gentile, as Ben Melech; so it is said in the Misnah p,
"he that vows in the name of an idol, and confirms in his name, (which Bartenora interprets, swears by his name,) transgresses a negative precept.''
Maimonides q also says,
"he that vows in the name of an idol, and swears by it, is to be beaten--he that swears by it himself, or causes a Gentile to swear by it; for it is forbidden to cause a Gentile to swear by his fear (or idol), and even to cause him to make mention of it, though not in the way of an oath, it is forbidden:''
neither serve them; by offering any sacrifice or incense to them, or by praying to them, or offering them praises on any account, or by performing any religious service in any instance or form whatever:
nor bow yourselves unto them; give them any adoration or worship, external or internal.
p Sanhedrin, c. 7. sect. 6. q Hilchot Obedeth Cochabim, c. 5. sect. 10.