First of all, let me clarify that I am not talking about inns which were located on the roads between major cities; I am talking about real restaurants inside the cities. I gave this some thought and I think that restaurants couldn't be more than a few hundred years old. This is because restaurants had to have come after the rise of the middle class. Before then, the poor wouldn't have enough money, and the rich probably had their own chefs.
I know that now it is different, but a few hundred years ago the primary reason why people would go to restaurants would have probably been if they just came from work and they had no food in the house (even if there was a middle class, they probably wouldn't go just to have fun, since they were still poorer (on average) than the middle class today). This would imply that they are single, since the wife would usually stay at home and cook. Since virtually all the people in the past were either married or lived with their family, I believe that the "invention" of restaurants was also synchronized with a rise in the amount of single people, which is fairly recent history. Am I right, and if not what is the correct timeline here? Thanks.