Agree. Great observation. Codes establish mood.
I have to agree here as well.
High prices don't make a nice restaurant.
You also need great service, quality food, and established codes that maintain the ambience.
Going to a Perkins restaurant dressed up doesn't make it a nice place.
Neither does going to a trendy restaurant with inflated prices, flip flops or not.
Ruth's Chris, Flemings Steak House, Houston's, and one near me Folk's Folly, are nice places.
You don't go into Houston's wearing a ball cap, or they will ask you to remove it.
If you don't, they will ask you to leave.
McDonalds, Hardees, IHOP, and even Outback will allow you to come in as you got out of bed.
I've noticed J. Alexander's allows some sort of casual, since it's near a mall.
My point being, many restaurants allow casual because they feel "if you want to spend $50-75 dollars for a meal in your shorts and flip flops, who are they to turn you down?"
Try that at Texas De Brazil, they'd love to have you spend $125 for 2, no matter what you're wearing.
But nice restaurants are still out there, for a date night, celebration of wedding anniversary, birthday party, etc, where ambience makes it special because of the dress code, or certain standards they require.