Shared ground
Joshua 23:6–7 presents loyalty to the LORD as something guarded by concrete practices. The people are called to steady, comprehensive obedience to “the book of the law of Moses,” pictured as staying on a straight path without drifting “right” or “left.” (That is an explicit image in the text.)
Joshua also treats Israel’s social environment as spiritually risky. Because other peoples still live nearby, close association can lead to public and practical acknowledgment of their gods. The passage lists boundaries that focus especially on public speech and public acts—naming other gods, oath-taking connected to them, and bodily acts of allegiance like service and bowing.
Where interpretation differs
How broad “do not come among these nations” is. Some read it as a near-total social separation (avoiding deep relationships, political alliances, and intermarriage). Others read it more narrowly as avoiding forms of participation that imply shared allegiance—especially in worship settings or covenant-making—without requiring ordinary commerce or basic neighborly contact to stop.
What “do not mention the name of their gods” covers. Some take it as a blanket ban on speaking those names at all. Others take it as a ban on invoking those names in reverence or ritual (especially in worship or oath contexts), not a ban on every possible reference.
What “cause to swear” is targeting. Some think the concern is formal legal oaths and treaties where divine names function as guarantors. Others think it also includes more everyday vow-making that normalizes those gods’ authority.
Why the disagreement exists
The passage uses short, forceful phrases without spelling out every boundary case. In a world where religion, treaties, and public life overlapped, the same words can be read as addressing (1) broad social integration that gradually reshapes loyalty, or (2) particular public practices (oaths, invocations, acts of homage) that directly signal allegiance. The verbs about naming and swearing can be heard either as “any use” or as “ritual use,” and the phrase about not turning right or left can be heard as “no deviation at all” or as “no selective obedience.”
What this passage clearly contributes
This passage explicitly connects obedience to Moses’ written instruction with exclusive allegiance in worship and public loyalty. It presents faithfulness not only as inward belief but as visible, community-shaped patterns—especially speech (names, oaths) and embodied acts (service, bowing). It also frames courage as the resolve to keep the written standard intact rather than drifting in either direction, particularly under pressure from surrounding cultures and relationships. See also Exodus 23:13 and Deuteronomy 6:13 for similar concerns about naming and swearing in relation to other gods.