Why would you kill it? That's such a cowardly act. I understand killing a mosquito that lands on you, or not wanting to be stung by a wasp. That could be regarded as an attack. It then becomes survival of the fittest.
But the fly is harmless. And the fly is so much smaller than you, defenseless. It's not a fair fight, and it's not a justifiable fight.
As primitive as the fly is, as much as it doesn't think like you or feel like you, it is a life, and that life is all it has, and it wants to live. How can your needs be so much more important than anything elses, that you would take a harmless life, for no reason other than that it's a little annoying to you?
It's a fantastic thing to be able to coexist with another life, neither of you harming one another.
The strongest, most mature, and most successful do not destroy those that they do not like, but learn to coexist with them.