Viewing old version a71f7d09bdaf5b2cae88fcd6c6f8fdeea09703f8; View Current
The Scala Tour doesn’t officially call out this feature.
In Scala, classes have no static members (as they can in Java and Ruby). Instead, Scala provides a means to create singleton objects. These are, essentially, global variables. However, by judicious use of naming, these objects can make your code more readable, especially with respect to PatternMatching.
Last Updated 08/19/2009 at 08:23:38 AM by davecblog comments powered by Disqus
Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.