Write ye this song - The song which follows in the next chapter. Things which were of great importance and of common concern were, among the ancients, put into verse, as this was found the best method of keeping them in remembrance, especially in those times when writing was little practiced. Even prose was sometimes sung. The history of Herodotus was divided into Nine books, and each inscribed with the name of one of the Nine Muses, because these books were anciently sung. Homer is reported to have sung his poems through different Greek cities. Aristotle observes that anciently the people sung their laws. And Cicero observes that it was a custom among the ancient Romans to sing the praises of their heroes at the public festivals. This was the case among the northern inhabitants of Europe, particularly in Ireland and Scotland; hence the Gaelic poetry of Ossian and others. See Dodd; and see the note on Exodus 15:1, where the subject is largely treated.
The transaction recorded in these verses may be regarded as the solemn inauguration of Joshua to the office to which he had some time before Numbers 27:22 been called, and his recognition in it by God, which were manifested by his being summoned into the tabernacle with Moses while the Lord appeared in the pillar of cloud (compare Numbers 11:25; Numbers 12:5).
Deuteronomy 31:16
The future apostasy of the people is announced in the presence of Joshua that the latter might be fully aware of the danger and strive in his day to avert it. This he faithfully did (compare Joshua 24:31); but we find him in his own last address to Israel repeating Joshua 23:15-16 the self-same prediction and warning.
Deuteronomy 31:19
A witness for me against them - i. e., an attestation from their own mouths at once of God‘s benefits, their own duties, and their deserts when they should fall away. Being in verse it would be the more easily learned and kept in memory. The use of songs for such didactic purposes was not unknown to the legislators of antiquity. Compare also the advice of Paul, “teaching and admonishing one another in psalms and hymns and spiritual songs” Colossians 3:16.
Deuteronomy 31:23
He gave - i. e., the Lord gave.