I have to disagree, just because its prescribed by a doctor doesn’t mean its ok or even safe. You’ve probably seen at least some of those drug recall commercials that say if you or someone you know took whatever and now are hurt call this number. Usually the list of side effects is worse than what it's supposed to cure.
I'll also mention a large portion of junkies started with prescription medication like painkillers, but when the prescription ran out and the doctor wont give them more their bodies are still physically dependent on it so they end up seeking it elsewhere, it's not good but it happens. However I'm mostly talking about stuff like percocet and oxycodone.
When it comes to caffeine it can be pretty bad as well, I personally know a few people that are addicted to it, if they don’t have they get migraines.