It was said above that in literary terms it didn't make any difference whether the impossibility was caused by scientific means (good science, bad science, wildly fictional "science, is irrelevant) or by magic. This is partly in error. According to the genre of any given story, it may not make any difference to the plot. But, a well written rationalization may provide a logical development to resolve the plot that is more satisfying than a fantasy one, which almost always smacks of arbitrariness. Also, plausibility, earned by using SF instead of fantasy, can make willing suspension of disbelief easier. There was a time when people rejected fairy tales and Monk Lewis was cutting edge for just putting magic in his horror!
Of course, the claim that science fiction is just another set of magic words that invokes an impossibility is entirely in error. Worse, it is semiliterate. You have to be pretty much completely style deaf to ignore the different tonalities of SF and fantasy impossibilities. Demons taking different forms and genetically engineered shapeshifters taking forms may be functionally the same impossibility
but they just don't have the same style! Further, if you're writing SF, the creativity of the rationalization is itself a hallmark of good style.
The thing about SF is, why write pseudorealistically about impossible things? Impossible things of course includes everything set in the future. The simple answer of course if that the future will be different. We know this, because the past was different! The notion that SF is in some sense about real possibilities acknowledges these rather simple facts.
In practice of course most SF, like most stories and dramas, isn't about
anything, it's just vicarious daydreaming. The thing about vicarious daydreams of course, is that they really are simple matters of taste and completely unamenable to discussion. Which is why a descriptive definition of SF merely notes that it is science fiction when an impossibility is rationalized as somehow truly possible. It's true that this leads to finding SF in James Bond movies or technothrillers, near future settings, etc. but there it is. It's a kind of mode of writing, no more a genre than realism is, so it can and has been used in multiple genres. SF cannot be defined as a genre any more than realism because it is not a genre.
The prescriptive definitions of SF claim that considerations of the future may not be realistic, i.e., faithful to real life now, but that it is still worthy. Objections that definitions of SF are merely expressions of malice fail on two counts, overlooking the difficulties in believing in the mindreading powers of the posters who fell into this trap. The first is that this is a fine expression of the genetic fallacy. So what if they
were motivated by snobbery? That doesn't answer the objection! This is a stupid, stupid rebuttal!
The seond failure, of course, lies in the tendentious refusal to consider alternative interpretations. Inevitably this mendacity is rationalized as superior sensitivity to the true difficulties.

(Again! This is an amusing thread.!) That of course, is that people like to invoke the irrationality of magic because they dislike rationality, because they don't believe in a causal universe, because they believe in an eternal Human Condition, because they think perception is reality, that your will makes your condition and all sorts of stupid, nasty, bigoted ideas of that ilk.
For example, the notion that a Foundation written as a wizard trying to restore the Roman Empire after its fall would be the same is perfectly absurd, even in storytelling terms. Why should we care about Wizard Harius Seldonius' efforts to restore the emperor? On the other hand, we do care about whether social science might actually advance to the point of making some sort of predictions, at least in a social engineering sort of way. The only reason for even imagining such nonsense as magic versus the Fall of Rome=Foundation is because of a visceral rejection of the very possibility.
Vonnegut couldn't really get away with claiming he was put into a category and simultaneously claiming the category existed because SF writers and fans got together for social reasons. This only seems reasonable if you don't understand what he's saying.
Pulp magazines reprinted Wells and Verne and even I think Hawthorne and Poe, very heavily. Wells et al. are the progenitors of SF. Mary Shelley too. The emergence of the understanding that there is a lawful universe and that some things are impossible, not even by magic, is prerequisite for the emergence of the SF technique. Swift and de Bergerac might have had an inkling. But that guy Wilkins and his wingety people, no, I don't think so.
Scifi rationalizations of vampires and werewolves (besides Jack Williamson, James Blish did one,) are plainly SF. They also tend to be kind of dull and foolish. Steampunk tends to be dull and foolish, too, especially the ones that Take Themselves (oh,so) Seriously.
Frankly, the imeptus for steampunk seems to be very much about reviving daydreams of the Empire on Which the Sun Never Sets and the White Man's Burden. The problems with steampunk artistically can be exemplified I think by a cursory comparison of Gore Vidal's Julian and Robert Charles Wilson's Julian Comstock.
Lastly, technically speaking historical fiction and science fiction are identical. There is the same fundamental divide between literal adherence to known fact and fictionalization/dramatization. And both geth the same disdain for the implicit notion that things will
not stay the same forever.