I decided to teach my son that language is language, neither good nor bad, it is what you do with it and why that matters. I also refused to be a hypocrit since there are those in my family who do indeed use curse words, perhaps more than they should, myself included. So rather then just say no, I laid it out for him when he was little that, you don't call a chicken a boat, just because the word exists. There are always better words to choose from. Intention and appropriatness were what mattered, this took away the whole mystery and taboo nature of those kinds of words. I promised to be more careful of my language and he was perfectly free to call me on it if I did use "bad" words. In exchange I said that if he ever felt the urge to use any himself, he was to come to me, and ask permission. He did a few times, and naturally I would ask why he wished to use the word, if it was really what worked best for what he was trying to say. 9.9 times out of 10 he decided it wasn't. There have been exceptions though.
When he was 8 or 9, we were at a county fair and had decided to ride the Zipper together for the first time. That ride scared the pants off me, but we love them anyway. So we were both brave, scared, and laughing. When it got going, and we started flipping around, screaming at the tops of our lungs, my boy yells "Mom! Can I use a curse word please! please!" And since he had the presence of mind to actually ask while in that situation, I had to say yes (though for myself a more benign litany of "mommy, mommy, mommy" seemed to work) and we both shrieked and laughed and held on for dear life until we were crying and wobbly when it was over.. and discussing which ride to head for next.
I know this may not be for everyone, but it has worked very well for us. He is 12 now and I have never once had to deal with his saying something inappropriate just to be cute or because he thought he could get away with it. He still thinks about his word choice even when many of the other kids his age are just starting to think being rude and vulgar for the sake of being rude and vulgar is a sign of rebellion and independence. He thinks that is pretty stupid on their part. We actually talked about it a little today while taking a walk to the store, as I was thinking over this topic.