Hats are wonderful. They increase comfort and the feeling of being in one's own little world. I usually sport a green commie-cap style thingy, I'm not sure quite what you'd call it but it's a less elaborate take on the baseball cap. Primarily worn to both cover the semi-bald patch and avoid unpleasant hair control precautions.
But with regards to sunglasses, I'll take them over a hat any day of the week, the things are truly perfection. A well-fitting pair of mirror aviators are perhaps the pinnacle of human sartorial endeavour.
I do always remember a comedian making the point that a man such as myself, wearing a hat, sunglasses and with a full beard looked insecure by having taken the maximum possible precaution against someone adding graffiti to a photo taken of me...

so it's hat or sunnies, and never the twain shall meet.