There will be times when you should be using them interchangeably, but you can get away with settling for one or the other. They're best used according to each situation, which will happen as you play. Considering enemies can ambush you out of nowhere, it's always good to have a melee weapon handy. It's good to strike a balance between them throughout the playthrough.