Some think that David penned this psalm at the time of Absalom’s rebellion; others that Daniel, Nehemiah, or some other prophet, penned it for the use of the church, when it was in captivity in Babylon, because it seems to speak of the ruin of Zion and of a time set for the rebuilding of it, which Daniel understood by books, Dan. 9:2. Or perhaps the psalmist was himself in great affliction, which he complains of in the beginning of the psalm, but (as in Ps. 77:1-20 and elsewhere) he comforts himself under it with the consideration of God’s eternity, and the church’s prosperity and perpetuity, how much soever it was now distressed and threatened. But it is clear, from the application of Ps. 102:25, 26, to Christ (Heb. 1:10-12), that the psalm has reference to the days of the Messiah, and speaks either of his affliction or of the afflictions of his church for his sake. In the psalm we have, I. A sorrowful complaint which the psalmist makes, either for himself or in the name of the church, of great afflictions, which were very pressing, Ps. 102:1-11. II. Seasonable comfort fetched in against these grievances, 1. From the eternity of God, Ps. 102:12, 24, 27. 2. From a believing prospect of the deliverance which God would, in due time, work for his afflicted church (Ps. 102:13-22) and the continuance of it in the world, Ps. 102:28. In singing this psalm, if we have not occasion to make the same complaints, yet we may take occasion to sympathize with those that have, and then the comfortable part of this psalm will be the more comfortable to us in the singing of it.