Staying friends with an ex? No way.
My question is: why?
If I made a grave mistake in a relationship and that mistake was the cause of the break up, then I will apologise and disappear, since my actions are probably damaging the girl. If we remained friends in that case, a similar mistake would certainly produce less amounts of pain, but it would still be painful.
And if it was certain that I would never do that mistake again, then I wouldn't allow the relationship to end. But If the girl didn't want to forgive me and was angry, it's not as if I could remain friends with her anyway, is it? So it's a break up and no friendship after all.
If we simply cannot communicate, or don't understand each other, or don't like each other anymore, then why continue being friends? It's not like our personalities would change just because our relationship would turn from lovers to friends. We would be the same people. And when I break up with someone because I don't like her anymore, it's because I don't like her as a human, not as a lover.
My rule is never allow insignificant things destroy a relationship, and do whatever it takes to keep it alive. But once it ends, better to never see that person again. Better to break up with dignity, and avoid any further interaction, so that both of us can continue on with our lives (and sex lives).