Y'know, the variety in magic weapons is one of the best things about them, but I think managing mana usage, regeneration rates, and max capacity, all without falling prey to mana sickness, also adds to the feel of it. There's no equivalent complexity in melee and ranged, so even if there were greater variety, I think they might still feel less satisfying.
We have stabby shortwords which no one uses, swinging broadswords, spears, and flails. Some unique things like sickles and the Solar Eruption. Then we have the vast majority of endgame weapons, which all fire some kind of projectile, which to my way of thinking is really a cop-out. What's "melee" about flinging a beam of light at something offscreen? But solving that would turn Terraria into a different game, so that's out.
You could use the mechanic introduced by the Brand of the Inferno - right-click to block, and the Striking Moment buff - to make melee more complex that way. Give lots of melee weapons a similar power, including those which throw "melee" projectiles, and make their normal damage too low to be viable unless they're using that block/counter mechanic, but better than average for that point in game progression if they do.
Throwing weapons, similarly, could give you a buff that raises damage to viable levels only when you avoid damage for a sufficient period of time - going with the whole agile rogue archetype. That mechanic could be derived from the way the Beetle Shell works.
(I don't know anything about coding, or what's possible to do, so I'm trying to think of ideas which have some kind of equivalent already.)
Ranged weapons could reward precision by giving a bonus to crit and/or damage when you stop shooting for a second.
But looking back at these ideas now that I've written them down, I'm sort of meh-ish on all of them.
Block/counter is really a novelty; trying to adopt it wholesale is pointless in a game which often resembles a bullet hell. Boss stats aren't tuned for it, enemy movement isn't designed for it, the whole concept of contact damage isn't conducive to it.
Viable throwing damage only when incoming damage is avoided is fine in theory, but leads inevitably to no-win situations.
Precision bonuses wouldn't work because sustained damage with a high ROF for multiple crit chances will always trump any one increased chance, even at 100%. And that's before we get into procs, which wipe out the whole idea anyway. Bah.
Well, I tried. Sorry. Maybe something in there will spark an idea for you?
I'll keep thinking about it, maybe something will occur to me that's complicated enough to be interesting, but not too complicated, and not going against the grain of the rest of the game.