Currently there are two types of clothes dryers on the market. One is the gas dryer, which is really half gas and half electric, and the other one is the full electric one. The gas operated one uses gas for lighting the flame that creates the heat in order to dry the clothes, whereas the electric machine used electricity to operates the engine, the timer, the thermostat and the coil kit.
One of the disadvantages of the gas one is that it has more parts than its electrical counterpart. When you have something with many little parts, there is a greater chance of more parts breaking down. This is why the gas one needs more often repairs than the other one.
Even if you prefer one over the other one, truly only the connection in your laundry room will tell you which type you can safely install. The electrical unit runs on 240V current which is actually double the regular household current. If your laundry room has not this type of voltage installed, you can either install it or buy a gas dryer. If you have both natural gas and 240V connection, you need to realize that the gas one tends to cost more than the electrical one, however in the long run the cost will be diminished due to the higher cost of general electricity.
The energy factor (the energy efficiency of the dryer) for the electrical clothes dryer is 3.01, while for the gas one it's 2.67, so it seems that the better one in this case is the electrical option due to its higher energy efficient factor.
However the gas type tends to dry your clothes faster which means you get to spend less time on your laundry. As the clothes dry faster, they allow faster evaporation of humidity from the clothes.
One problem with gas is that it is more sensitive to venting due to the fumes, so if you buy a gas clothes dryer you need to check the vent pipe often for leakage. When you have an electric type, it can be vented inside during the winter, which you can't do with gas.
People always will have one preference over the other one based on various criteria, logical or personal. Both appliances are great to dry your clothes but you need to make sure with no matter which you buy that it is kept properly cleaned.