John Calvin (1509-1564), commentary on Genesis 38:8-10:
Besides, [Onan] not only defrauded his brother of the right due him, but also preferred his semen to putrify on the ground, rather than to beget a son in his brother’s name.
v. 10: The Jews quite immodestly gabble concerning this thing. It will suffice for me briefly to have touched upon this as much as modesty in speaking permits. The voluntary spilling of semen outside of intercourse between man and woman is a monstrous thing. Deliberately to withdraw from coitus in order that semen may fall on the ground is doubly monstrous. For this is to extinguish the hope of the race and to kill before he is born the hoped-for offspring. This impiety is especially condemned, now by the Spirit through Moses’ mouth, that Onan, as it were, by a violent abortion, no less cruelly than filthily cast upon the ground the offspring of his brother, torn from the maternal womb. Besides, in this way he tried, as far as he was able, to wipe out a part of the human race. If any woman ejects a foetus from her womb by drugs, it is reckoned a crime incapable of expiation and deservedly Onan incurred upon himself the same kind of punishment, infecting the earth by his semen, in order that Tamar might not conceive a future human being as an inhabitant of the earth.
Quoted in an appendix of Charles D. Provan’s The Bible and Birth Control
The Calvinists and many other Protestant groups have wandered far from their early reformer roots, and not just on the issue of contraception, either.