Yes, you’re a realist to notice that the glass of water is both half empty and half full. The functional difference between optimism and pessimism is nothing more than the story we tell ourselves.
If we’re convinced that failure is inevitable, it’s only rational to give up. I’ve always considered myself delusionally optimistic. Apparently delusion doesn’t always work against us. Science now confirms what we’ve probably guessed all along: the story we tell ourselves matters. And if we tell ourselves optimistic stories, some form of success is almost unavoidable.