In my experience, when converting cash to a foreign currency, the exchange rate is often terrible. You also potentially get stuck with leftover currency.
It is often possible to get a much better conversion rate via credit cards- PROVIDED- you pay attention to the fees that each credit card charges for the conversion, AND you follow the advice below:
A second IMPORTANT thing to know when using a credit card in a foreign country, I'm not sure how to say this clearly, but ALWAYS choose to pay in the local currency. Sometimes when you use a credit card the card reader will give you a choice between the local currency and your currency. BEWARE! If given this option DO NOT choose to covert because the rate will be terrible. just choose the local currency.
Some credit cards claim they don't charge a foreign transaction fee, but then they do charge it via the conversion rate they give. People who travel frequently probably know the best cards, but often the conversion rate is approx 3-4%. the rate to convert cash is usually higher.
That said, it can still be helpful to convert a small amount of currency for tips/gratuities and other small purchases. If one wishes to tip housekeeping/bell services, cash is pretty much the only option.