Are diet cokes okay for diets?

When I went to the doctor, we were discussing a diet. He asked what I normally drink, and I said diet dr peppers, etc. Only diet soda. He said that was fine and he wasn't worried about that.

If the doctor says that, then why does everyone cut out diet sodas on a diet?
Are diet cokes okay for diets?
Post Opinion