It was in 2012 that the US Navy test-fired a railgun for the first time, subsequently announcing plans to equip one on guided-missile destroyer USS Zumwalt.
Two years later, the Navy trialed a laser on USS Ponce, an amphibious transport dock, destroying the engine of a small inflatable boat without hitting the rocket-propelled grenade aboard.
In June of this year, the Army successfully tested a laser of their own, mounted on an Apache helicopter — and the Air Force is planning to fit out their range of AC-130s with a similar weapon.
However, despite several successful tests, the two weapons aren't currently operational — while the mainstream media has reported USS Ponce's laser is ready to be fired at targets "today and every day," the weapon is said to not be the "final product." Instead, it's a low-energy version of a planned future weapon that has only been trialed on drones under controlled conditions. If USS Ponce and crew were genuinely threatened by an enemy, they would still need to use conventional weapons.
By definition, questions remain as to when and whether the intended final product will be operational, how it will be used, and whether it'll be used independently or in tandem with, and more or less than, traditional defenses.
Moreover, while both railguns and lasers are innovative weapons, they have unique capabilities, and specific strengths and weaknesses. Lasers theoretically have greater application, given they can be set to different energy levels, giving operators the option to take out or simply deter targets.
For example, if a US ship perceives an aircraft to be a threat, the laser could be set to low power in order to "scintillate" the foe's cockpit, and compel the pilot to reverse course. While that aviator may be dazzled or stunned by the ray, they likely wouldn't be injured.
Alternatively, operators could crank up energy levels and destroy the target, by melting precision holes through the craft or even cutting through it — although such capabilities remain very much in the development stage.
For larger targets, railguns would probably be the optimal weapon — after all, they can already cut straight through thick steel.
However, it will take years for both to supplant conventional weapons once they are operational, if that point ever comes. While further development will likely up their ante, both pose challenges to militaries — in particular, how they will be powered, and fueled.
It requires a lot of power to generate a beam capable of burning through a target, which limits where a laser can be taken, and indeed placed on a craft.
Nonetheless, they would be cheaper to use and maintain, and even potentially safer, as they don't require stores of ammunition with explosive potential to be hauled round with them. For instance, if an Apache helicopter needs to take out a generator providing electrical power to an enemy command post, or light vehicle, a laser would be more efficient and economical than a Hellfire missile, currently priced at US$115,000 apiece. Moreover, they would theoretically increase accuracy significantly, to perhaps perfect levels, from greater distances at the speed of light.
By 2025, the power of laser systems could reach in excess of 300 kilowatts, a degree of power that could knock incoming missiles out of the sky head-on.
Evidently, in the military world reality is increasingly catching up with fiction, although lightsabers — every Jedi's favorite tool — will likely remain firmly planted in the fantasy realm for some time.