Immanuel Kant

Immanuel Kant was a moral philosopher who didn't believe in exceptions. He maintained that stealing or murder was wrong in all circumstances. As the Fourth Doctor explained, he might argue that "stealing sweets is wrong, [...] because if everyone stole sweets, there wouldn't be any sweetshops." (PROSE: Categorical Imperative)

When Sarah Jane objected that it would be wrong of the Doctor to kill a baby, even if he was destined to cause the Earth's destruction, the Fourth Doctor told her that she'd get along with Kant. (PROSE: Categorical Imperative)

Behind the scenes
Kant's, central to his moral philosophy, lent its name to the Short Trips short story of the same name: Categorical Imperative, by Simon Guerrier.

That story deals with issues of morality, asking specifically if the murder of a child can be justified, if that act serves to prevent future destruction, of which the Doctor has foreknowledge. The Doctor makes clear within this story that Kant's position is that murder is always wrong; Sarah agrees with Kant, while the Doctor considers a more approach to the situation. Several incarnations of the Doctor arrive to kill the baby, and so save the world, but each shies away from completing the action.