In the fourth episode of the TV show The Expanse, "CQB", the Martian warship MCRN Donnager is attacked by stealth ships. When the attack begins they fire torpedoes at long ranges and then switch to railguns when they are at close quarters.
Why wouldn't they use railguns at long distances when there is nothing to slow the projectile down in a vacuum? The only countermeasures the ships seemed to have are guns to shoot incoming torpedoes but this would be impossible with railgun slugs.
Also surely it would be better to use the torpedoes at close range as there would be less chance for the enemy to destroy them with their defensive guns?