My vote is for gas when you have a choice.
I have owned/restored/used many dryers and I absolutely prefer gas. Not only is it usually cheaper and faster, but in my experience, it is easier on the clothes; especially if you use timed drying. Burning natural gas typically forms about 10% water vapor which is not condensed in the later stages of the drying cycle, but acts as a buffer.
As an example, an electric dryer will go from just barely damp to extra crispy overdried very quickly whereas a gas heated dryer will be noticeably more forgiving about overdrying. For any given dryer outlet temperature, the clothes in a gas dryer will not feel as hot to the touch. I have also noticed that items dried in a gas dryer just seem to be softer to the touch and have less static charge after drying. With a good rinsing washer and gas dryer, I never need to use softeners of any kind.
Additionally, because the water vapor [formed in combustion] is condensed early in the cycle while the clothes are still wet, that energy is recovered resulting in more initial heat input and thus faster drying times.
In my experience, I haven't noticed any gas "residual" problems, but I'm burning clean natural gas in a properly functioning dryer. I suppose that poor quality (impure) gas and/or an improperly adjusted burner has the potential to cause a problem. Incidently, my mother runs a propane fired dryer and has not noticed any problems (although it is somewhat noisier).
Finally, concerning cost of operation: I just ran the calc's and assuming a similar heat input into an equivalent dryer (5600W Electric or approx. 20-22k BTUH gas) I came up with these figures to heat the dryer:
$0.60 a load for electric; and,
$0.21 per load for gas.
This is based on Southern California average rates of about $1.50 per therm (natural gas) and $0.1626 per kWH. In some areas of the country it could be up to 5:1 ratio in favor of gas.
Hope this helps!