Melee weapons in science fiction are just rule-of-cool. They don't stand up to a plausibility check in hard science fiction.
In real life, the trend goes to weapons which allow you to kill your enemy from greater and greater distances while you stay as safe as possible. Latest development in that direction: The combat drone which allows you to kill people while you remote-control it from thousands of miles away.
Still, someone who jumps around and beheads people with a glowing sword is much more exciting to look at than someone who sits behind a computer screen and targets missiles.
A good example is the Warhammer 40k universe. Although the personal weapon technology is more advanced than it is now, it hasn't advanced in any way which changes how combat works. Ranged weapons are still "point at target, pull the trigger, and when you aimed correctly it dies" and melee weapons are still "Whack the target and it dies". Still, the universe has much more use of melee weapons than current armed conflicts. Why are melee weapons effective in the WH40k universe? Not because they are plausible. They work because the Warhammer 40k universe consists of only 5% matter and 95% badass.
former Manasource Programmer
former TMW Pixel artist
NOT a game master
Please do not send me any inquiries regarding player accounts on TMW.
You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.