On the benefits of optimism