James Gunn said this quote

Science fiction always has had strains of pessimism and optimism weaving through its historical development, sometimes one dominating and then the other, usually depending on the state of the world.