During the re-writing of the Logic, Dr. Whewell’s Philosophy of the
Inductive Sciences made its appearance; a circumstance fortunate for me,
as it gave me what I greatly desired, a full treatment of the subject
by an antagonist, and enabled me to present my ideas with greater
clearness and emphasis as well as fuller and more varied development, in
defending them against definite objections, or confronting them
distinctly with an opposite theory. The controversies with Dr. Whewell,
as well as much matter derived from Comte, were first introduced into
the book in the course of the re-writing.
Note from KBJ: One must keep in mind that Mill, unlike, say, Kant, was not an academic. He couldn't bounce ideas off a colleague down the hall.