There has been a resurgence of interest in optical computing over the past decade, both in academia and in industry, with much of the excitement centered around special-purpose optical computers for neural-network processing. Optical computing has been a topic of periodic study for over 50 years, including for neural networks three decades ago, and a wide variety of optical-computing schemes and architectures have been proposed. In this paper we provide a systematic explanation of why and how optics might be able to give speed or energy-efficiency benefits over electronics for computing, enumerating 11 features of optics that can be harnessed when designing an optical computer. One often-mentioned motivation for optical computing -- that the speed of light $c$ is fast -- is not a key differentiating physical property of optics for computing; understanding where an advantage could come from is more subtle. We discuss how gaining an advantage over state-of-the-art electronic processors will likely only be achievable by careful design that harnesses more than one of the 11 features, while avoiding a number of pitfalls that we describe.