Gunpowder has been around for quite a long time, for just over a thousand years. Historians have been able to trace the origins of the first weaponized use of gunpowder to sometime before Genghis Khan and the rise of the Mongol Hordes that swept through China. When gunpowder reached Europe, sometime during the Thirteenth or Fourteenth Centuries, the first cannons and hand held weapons were invented. Those early muzzle loading muskets were large and heavy, and required a sort of bipod to be used properly. Musket technology continued to advance until the earliest breech loading muskets came onto the scene during the late Eighteenth Century. Breech loading muskets were the first weapons to use self-contained cartridges, and were much easier and more efficient to load than the earlier muzzle loading variety.
Improvements to technology and warfare proceeded on an even pace, until the late 1800's when modern smokeless powder was invented. Smokeless powder was a vast improvement over black powder. Cartridges could now be loaded much hotter than any black powder weapon; this meant greater projectile speed which increased accuracy, projectile distance, and penetration power. The first application of smokeless powder was for military use, but it was soon adopted for hunting and personal use.
Smokeless powder has improved over the past 100 years; modern powders provide bullets with ever increasing speed and power. However, the technology has remained the exact same. A cylinder is filled with primer and powder, capped with a bullet, and then inserted and fired from a firearm. Why are we still using weapons that are based on technology developed during the 1800's? There must be modern alternatives to this process of shoving exploding powder filled cartridges into a gun and hoping the gun will fire, and not blow up in our faces as has happened many times throughout history.
Over the past century there have been a few attempts to replace weapons that use gunpowder. The 2013 Annual of Guns & Ammo magazine featured a story that was originally printed in the year 1965, the topic was something called the "Gyrojet". This weapon used a rocket type projectile that was far more advanced than anything that uses exploding powder. The various guns ranged in caliber from 7.52mm through 20mm could be fired at various velocities, without any perceptible recoil. The Gyrojet could have revolutionized the world's understanding of small arms technology. Unfortunately, it never gained the interest of either military or civilian customers.
Modern science has developed several alternatives to powder filled cartridges. Among those alternatives are: electric guns, directed energy weapons, and some other ideas using advanced technologies. Directed energy weapons, such as microwave weapons, have been in military use for decades; but it is unlikely they will ever be popular or made available to the civilian market. Perhaps the most practical and realistic option for the near future is the electric gun. The electric gun uses an electromagnetic pulse to propel the projectile down the barrel of a gun. This allows the projectiles to reach incredible speeds, with far greater power and distance than any gunpowder weapon. The History channel featured an episode of its "Modern Marvels" program dedicated entirely to the electronic gun, about 20 years ago. The US Navy is beginning to place "rail" guns of some of its vessels; these are the same electric guns that were featured on the History Channel program 20 years ago. The Navy estimates that when fully implemented the rail gun will be able to shoot projectiles for distances of more than 100 miles. The rail gun technology can be miniaturized and adapted to civilian style weapons; however, traditional gun manufacturers would be put out of business as a consequence.
I am not certain how long the use of gunpowder in weapons will continue. For the present, the use of electronic guns is still in the experimental stages. Millions of people own gunpowder firearms, and those guns still get the job done, so gunpowder will still be around for the foreseeable future. But if electronic guns ever become available for civilian use I might buy one, or I might not; it depends on the price.