Part of the power of Scala is that it encourages developers to create immutable objects by default.
Scala的一个强大之处就在于,它鼓励开发人员以默认方式创建不可改变的对象。
Anders Janmyr has a good overview of the new features including the ability to support non-extensible and immutable objects.
Anders Janmyr出色地概述了新功能,包括支持非扩展性和不可变对象的能力。
There can be no side effects on immutable objects, and caching a reference to an immutable object is always safe from alias problems.
不可变对象上没有副作用,并且缓存不可变对象的引用总是安全的,不会出现别名问题。
应用推荐