Don’t use vars inside singleton objects
Scala enables immutability and functional programming but it does not dictate it. As easy it is to create immutable state via a val it is equally easy to create mutable state via a var. IMHO this is a good thing since the programmer is free to choose the programming style to use according to the […]
continue reading Don’t use vars inside singleton objects