Scala Object
Viewing old version a71f7d09bdaf5b2cae88fcd6c6f8fdeea09703f8; View Current
The Gist
The Scala Tour doesn’t officially call out this feature.
My Interpretation
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 davec
blog comments powered by Disqus
All Content by David Copeland is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.