“A rail gun also shoots farther than lasers, because of simple physics: Even the most powerful laser will fire a straight line-of-sight shot that eventually goes off into space, while a rail gun can fire a solid shot in a ballistic trajectory against targets beyond the horizon.”
https://breakingdefense.com/2014/04/navys-magnetic-super-gun-to-make-mach-7-shots-at-sea-in-2016-adm-greenert/
https://breakingdefense.com/2014/04/navys-magnetic-super-gun-to-make-mach-7-shots-at-sea-in-2016-adm-greenert/