O'Reilly logo
  • Xing Ping Zhang thinks this is interesting:

Similarly, a mutable variable is declared with the keyword var and it must also be initialized immediately, even though it can be changed later, because it is mutable:

From

Cover of Programming Scala, 2nd Edition

Note

使用var声明的变量也必须在声明时候就对其进行初始化,尽管以后他可以引用别的对象。