The Persistence of the Piston Engine

Why hasn’t electric or some other method of propulsion taken over yet?