Shared ground
These verses present a pause and a pivot. The speaker is tempted to voice his bitter conclusion, but stops because that kind of speech would harm God’s people (“the generation of your children”). That restraint is part of the story, not a side note (v. 15).
The speaker also admits that trying to solve the problem by mental effort alone did not work. It increased distress rather than producing clarity (v. 16).
The turning point comes “until” he enters God’s sanctuary. In that setting he begins to weigh the “latter end” of the people who currently look secure (v. 17). The text explicitly ties new perspective to entering the sanctuary, not to finally finding a clever argument.
Where interpretation differs
What does “betrayed” mean? Some read it mainly as misleading others: if he spoke his despair as truth, it could destabilize or confuse the faithful community. Others read it mainly as breaking solidarity: voicing it would align him against God’s people, like disowning them.
Who is “the generation of your children”? Some take it as the faithful people living at the time (the community around him). Others hear a broader sense: the ongoing line of God’s people, including future worshipers who inherit the story and songs.
What happens in “the sanctuary”? Some understand it as corporate worship (songs, prayers, sacrifices) reshaping his sense of time and justice. Others emphasize instruction and reflection there, where God’s ways are taught and remembered. Both approaches still see the sanctuary as the setting where his viewpoint changes.
Whose “latter end” is considered? The most direct reading is that “their” points back to the apparently successful, morally reckless group he has been describing. A minority reading takes it more generally (humanity’s end), but the immediate flow favors the specific group.
Why the disagreement exists
The lines are brief and use relational language (“betrayed,” “children,” “generation”) that can be heard in more than one direction—toward protecting others, or toward loyalty to a shared identity. “Sanctuary” also names a place, but the text does not spell out which aspect of being there (ritual, teaching, presence, memory) produced the insight.
What this passage clearly contributes
The text offers a pattern of movement: near-speech that would damage the community (v. 15), failed private reasoning that deepens pain (v. 16), and a re-framing that comes in the sanctuary as the speaker considers the “end” of the enviable wrongdoers (v. 17). The theological inference (beyond the explicit claims) is that public speech, communal belonging, and worship-space perspective matter in how moral crises are processed, but the passage itself keeps the focus on the speaker’s hinge-point and the re-weighing of outcomes.