To all of those saying that Federer should retire in order not to diminish his heritage:
Your historical perspective is nil. Your view is limited.
Think about Rod Laver, who may still be the GOAT ("Greatest Of All Time") based purely on his double calendar GS ("Grand Slam").
He achieved those in 1962 and 1969.
He still remained active until his late thirties, until the late 1970s.
Certainly he knew he would not equal his "prime" 1969, that his results to lesser opponents would be going to his disadvantage. He was certainly more intelligent, in tennis terms, than any of his doubters, to realize that.
E.g. his career head-to-head is 1-4 against Ilie Nastase, whose prime was 1972-1973 (winning the USO and the RG), who was 8 years his junior.
http://www.atpworldtour.com/Players/Head-To-Head.aspx?pId=L058&oId=N008
He was 39 when he was beaten last by Nastase.
His series with Stan Smith (also 8 years his junior), whose prime was 1972, is tied at 6-6 only because Laver continued to play into his thirties:
http://www.atpworldtour.com/Players/Head-To-Head.aspx?pId=L058&oId=S060
thus losing the last five of them.
Laver competed in such a way and his style of play was so unique that he made any of those duels worth watching, even when the final result was not to be in his favor because of his having lost a step to age, even though his competitors might have caught up to him in terms of speed, power or even mental edge at that very time.
Now, did he subsequently fare worse than Borg, who retired immediately he started to seriously lose, in terms of fame, because of staying in the game long past his prime?
No, those in the know know he didn't.
On the contrary, he's still at the top when GOAT discussions are around, for 50 years now, in the mix with Sampras and Federer.
Like Federer today, Laver in his thirties did a great service to the tennis community by continuing to present a great style of play, even if the results weren't favorable to him.
Thanks God for Federer. Otherwise it would be only the ugly, workmanlike, academies-sponsored game, the ugly game created by Borg-Agassi, against which the sparkling style of Nastase-McEnroe-Sampras-Federer lineage will be always pitted.
New generations of players need Federer just for the visual gratification and showcasing of a great style of play (yes: S-Volleying, even though less than Sampras; yes: 1HBH; yes: smaller-head raquets), just as yesteryear's generations needed Laver to stay around.
We need models and Federer is the best model against the uniformity that traps the current game. He's the model of great physical and mental talent, of great and easy shotmaking, against the great plodding.
We need him because he is the star that was and still is both extremely spectacular and light-moving and deadly efficient while at it.