Arthur Schopenhauer said this quote

optimism, where it is not just the thoughtless talk of someone with only words in his flat head, strikes me as not only absurd, but even a truly wicked way of thinking, a bitter mockery of the unspeakable sufferings of humanity.