Arthur Schopenhauer said this quote

I cannot here withhold the statement that optimism, where it is not merely the thoughtless talk of those who harbor nothing but words under their shallow foreheads, seems to me to be not merely an absurd, but also a really wicked, way of thinking, a bitter mockery of the most unspeakable sufferings of mankind.