With all good technologies, there comes a time when buying the alternative no longer makes sense. Think smartphones in the past decade, color TVs in the 1970s, or even gasoline cars in the early 20th century. Predicting the timing of these shifts is difficult, but when it happens, the whole world changes. It’s looking like the 2020s will be the decade of the electric car. Battery prices fell 35 percent last year and are on a trajectory to make unsubsidized electric vehicles as affordable as their gasoline counterparts in the next six years, according to a new analysis of the electric-vehicle market by Bloomberg New Energy Finance (BNEF). That will be the start of a real mass-market liftoff for electric cars. By 2040, long-range electric cars will cost less than $22,000 (in today’s dollars), according to the projections. Thirty-five percent of new cars worldwide will have a plug.